Hi, Im trying to use this fancy box gallery, but i have to get this in the template. I keep getting this error "Fatal error: Smarty error: [in head.tpl line 26]: syntax error: unrecognized tag 'href' (Smarty_Compiler.class.php, line 599) in /home/truckyar/public_html/includes/classes/smarty/Smarty.class.php on line 1092" Any ideas why? Cheers, Nick <script type="text/javascript"> $(document).ready(function() { $('.fancybox').fancybox(); $("#fancybox-manual-c").click(function() { $.fancybox.open([ {/literal} {foreach from=$data item=image} { href : '/photos/{$image.image}', }, {/foreach}{literal} ], { helpers : { thumbs : { width: 100, height: 75 } } }); }); }); </script>
Im hoping this will be something simple but ive spent all night working on it. It needs to output like this. $("#fancybox-manual-c").click(function() { $.fancybox.open([ { href : 'iDSC01286.jpg', }, { href : 'iDSC01287.jpg', }, { href : 'iDSC01288.jpg' } ], {
Good to hear its working. You may want to reference this tutorial for more info: http://www.68classifieds.com/forums/threads/tutorial-switch-image-gallery-to-fancybox.11823/