Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

image gallery problem with css and gallery_ui


Go to End


6 Posts   1147 Views

Avatar
Scorpiankh

Community Member, 63 Posts

23 January 2014 at 3:20pm

I've got the tractorcow/silverstripe-imagegallery module installed on a website I'm building with SS3.1, only problem is when I look at the gallery pages they're not linking in the CSS files for the module (so all of the gallery data is displaying as unstyled) and the gallery_ui popup things aren't working (so when you click on an image thumbnail it just opens up the image in a blank window ... which seems as if it might also be an issue with the CSS file not being linked into the page as well as the JS).
No error messages or anything, the site just seems to be ignoring those CSS files
I can't for the life of me figure out why, everything looks like it's as it should be ... but it's been a while since I've used silverstripe and it's all changed, so maybe I'm not even looking in the right place ...
Can anyone please help or point me in the right direction?

Avatar
thomas.paulson

Community Member, 107 Posts

23 January 2014 at 6:14pm

try replacing

Requirements::themedCSS('ImageGallery');

with

Requirements::css( 'ImageGallery/css/ImageGallery.css', 'screen,projection' );

in ImageGallery / code / ImageGalleryPage.php

Avatar
Scorpiankh

Community Member, 63 Posts

23 January 2014 at 6:38pm

Thanks for the reply.
Changing that line didn't work though.

Avatar
thomas.paulson

Community Member, 107 Posts

23 January 2014 at 8:01pm

it does work, though there are some minor problem with css.

I have tested in localhost.

Please check the module name is ImageGallery. If not try with module as below

Requirements::css( ' - module name - /css/ImageGallery.css', 'screen,projection' );

Avatar
Scorpiankh

Community Member, 63 Posts

24 January 2014 at 9:38am

Oh, right! I don't know how I missed that .... changed it to:
Requirements::css( ' ImageGallery-3.1/css/ImageGallery.css', 'screen,projection' );
And that seems to have for worked kinda .. though now it's not loading the images in the galleries, just show the loading gif

Avatar
thomas.paulson

Community Member, 107 Posts

24 January 2014 at 3:22pm

try disable css in ImageGallery/css/ImageGallery.css

.gallery-layout {
/* background: url("../images/ajax-loader-lg.gif") no-repeat scroll center center transparent; */
}

.gallery-layout li a {
/* visibility: hidden; */
}