7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » ImageGallery Display All Albums and All Images on one page
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: | 895 Views |
-
ImageGallery Display All Albums and All Images on one page

20 January 2010 at 2:41pm
Is there away to display the data like the following?
Album 1 Title
Album 1 Description
<<Album 1 Image 1>>
<<Album 1 Image 2>>
<<Album 1 Image 3>>Album 2 Title
Album 2 Description
<<Album 2 Image 1>>
<<Album 2 Image 2>>
<<Album 2 Image 3>>ect...
I was thinking something like this:
<% control Albums %>
<h3>$AlbumName</h3>
<p>$Description</p>
//Some sort of logic to display the child images for each album
<% end_control %>I hope that makes sense. Thanks in advance. This is an awesome addition to SilverStripe by the way.
Cheers,
Jim -
Re: ImageGallery Display All Albums and All Images on one page

20 January 2010 at 3:36pm
You should be able to do this..
<% control Albums %>
$AlbumName
$Description
<ul>
<% control GalleryItems %>
$GalleryItem
<% end_control %>
</ul>
<% end_control %>But I doubt that will work because each item needs to have its UI set. This is one of the many reasons ImageGallery needs to be re-architected. That should be very easy to do.
Right now it looks like the only way to do it is to write the markup and include the UI yourself.
<% require javascript(path/to/some/ui.js) %>
<% require css(path/to/some/ui.css) %><% control Albums %>
$AlbumName
$Description
<ul>
<% control GalleryItems %>
<li><a rel="some_ui" href="$Large.URL">$Thumb.URL</a></li>
<% end_control %>
</ul>
<% end_control %>
| 895 Views | ||
|
Page:
1
|
Go to Top |

