HI
I'm trying to get the image gallery module up and running on a new website, used <% require %> to call in the css and javascript, it's half working so I must have done something right, I'm just not sure where I'm going wrong ...
I've got:
public function init() {
parent::init();
// You can include any CSS or JS required by your project here.
// See: http://doc.silverstripe.org/framework/en/reference/requirements
Requirements::css("ImageGallery/css/ImageGallery.css");
Requirements::css("ImageGallery/gallery_ui/fancybox/css/fancy.css");
Requirements::javascript("ImageGallery/javascript/imagegallery_init.js");
Requirements::javascript("ImageGallery/gallery_ui/fancybox/javascript/jquery.fancybox.js");
Requirements::javascript("ImageGallery/gallery_ui/fancybox/javascript/jquery.pngFix.pack.js");
Requirements::javascript("ImageGallery/gallery_ui/fancybox/javascript/lightbox_init.js");
}
in the page.php file,
and
<% require CSS('ImageGallery/css/ImageGallery.css') %>
<% require CSS('ImageGallery/gallery_ui/fancybox/css/fancy.css') %>
in the head tags on Page.ss
and
<% require javascript('ImageGallery/javascript/imagegallery_init.js') %>
<% require javascript('ImageGallery/gallery_ui/fancybox/javascript/jquery.fancybox.js') %>
<% require javascript('ImageGallery/gallery_ui/fancybox/javascript/jquery.pngFix.pack.js') %>
<% require javascript('ImageGallery/gallery_ui/fancybox/javascript/lightbox_init.js') %>
below the footer, within the body tag on Page.ss ...
The gallery is KIND OF working, i've got albums, images, etc; css is working for albums and gallery pages, but when I click on the image in the gallery it opens in a blank window instead of in the popup window like it should.
I'm not sure if i've done something wrong in the requirements and the javascript isn't working at all, or if I've done the requirements right and it's just whatever is inside the 'gallery_ui' folder that isn't being called.
I've not used SS for a while so I'm more than a little rusty, and I've never used requirements before ... and sure it's something really silly .. but any help would be appreciated.
Ta