CakePHP: Display view in Lightbox? -
i looking way display view in lightbox or thickbox in cakephp.
is there way how this?
thanks in advance
something should ~
you'll want create new layout, includes css , formatting required lightbox view.
function show_lightbox($id) { $this->layout = 'lightbox'; $this->set('page_content', $this->model->read(null, $id)); } and create links content, in view appropriate lightbox rel or class, not forgetting include js/css lightbox.
<?php echo $this->html->link('view in lightbox', array('action'=>'show_lightbox', 1), array('class'=>'lightbox-link', 'rel'=>'lightbox') ); /* <a href="controller/show_lightbox/1" class="lightbox-link" rel="lightbox">view in lightbox</a>*/ ?>
Comments
Post a Comment