7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » imagegallery module different template another section of site
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 803 Views |
-
imagegallery module different template another section of site

26 March 2010 at 9:06am
I have implemented imagegallery module (IGM) on two different sections of my site (photos, products).
I want the album display for my products to be slightly differnt to my photos but i can not seem to change the display of 'ImageGalleryPage_album.ss'.
I have tried putting if statement in as follows but does not work.
<% if Page(productAlbum) %>...
Can anyone help?
-
Re: imagegallery module different template another section of site

26 March 2010 at 9:36am
I usually tag my body with id="$URLSegment" and class="$ClassName".. that way you can make subtle changes in your CSS on a page-by-page basis without having to create new templates.
-
Re: imagegallery module different template another section of site

26 March 2010 at 9:53am
Cool.
I now get
<body id="what-we-sell-2" class="ImageGalleryPage">
obviously the class="ImageGalleryPage" will be the same on all imagegallery pages so
I try
<% if $URLSegment == what-we-sell-2 %>
but does not work. can I use this approach?
-
Re: imagegallery module different template another section of site

26 March 2010 at 10:04am Last edited: 26 March 2010 10:04am
No, no... CSS is your friend!
body#your_id #gallery_layout { some rule }
-
Re: imagegallery module different template another section of site

26 March 2010 at 10:11am
perfect!
...can't believe I did not see that!
have been struggling with that for a few days..
Thanks!!
-
Re: imagegallery module different template another section of site

26 March 2010 at 10:33pm
And don’t forget that you cannot use $ inside controls, that should work (note the single = operator):
<% if URLSegment = what-we-sell-2 %>
Hope it helps… later.
| 803 Views | ||
|
Page:
1
|
Go to Top |

