I have a problem with adjusting the gallery plugin in CakePHP. (to be more specific this plugin: https://github.com/barman789/cakephp_gallery_plugin). I managed to run this plugin in seperate site by adding in routing.php:
Router::connect('/:language/gallery', array('plugin' => 'gallery_manager', 'controller' => 'albums', 'action' => 'index'),array('language' => implode('|', $languages)));
Router::connect('/:language/gallery/add/*', array('plugin' => 'gallery_manager', 'controller' => 'albums', 'action' => 'add'),array('language' => implode('|', $languages)));
I have already created page with 'News' page where i can add posts in admin mode etc. but i would like to have and option to add gallery to every post with option to add/delete images in it. I wanted to include element in each post by putting:
<?php echo $this->element('GalleryManager.gallery', array('result' => $result)); ?>
but i keep getting error:
Notice (8): Undefined variable: result [APP/View/Dogs/index_psy.ctp, line 37]
Warning (2): Invalid argument supplied for foreach() [APP/Plugin/GalleryManager/View/Elements/gallery.ctp, line 10]
I spent alot of time searching for solution to this problem or looking for some other option how to make this gallery. I would appreciate any help solving this or finding new idea how to do it. Thanks alot in advance!