Quick question, I want just the current album's description listed on the specific album page. I can only loop through all of the descriptions, not get just one. I see there is an $AlbumTitle var, so wondering if there is something like $AlbumDescription or similar?
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.
DataObjectManager Module /
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Getting Description On Album Page
Oooh.. good idea. I've checked that into SVN for you.
Excellent, cheers.
I'm out of the office and will get working on this later. Mind telling me which file the change applies to? I have a decently modified version and I used SVN to download the copy onto my computer, and then upload it to the server. I no longer have the original version. (don't ask) haha.
While I'm here, any chance of having pagination for the album list? I have one image gallery page, and a lot of albums within it. I'd like to show the last X per page. Like how it works for amount of photos per page for the actual album.
I believe ImageGalleryPage.php has the change. Just FYI, in recent revisions, ImageGallery has become a lot more extendible through subclassing. You can now use custom Album, Image, and Page classes for ImageGallery which is designed to keep you out of the core code so you have the liberty to customize, but still get updates without any snags.
I don't have a timeframe for the album pagination. If you want to write the code in your modified version, send it along, and I'll ratify and check it in.
Okay great. Thanks good to hear about the new subclassing. I can't remember which version I'm currently running, but this will come in handy. I always dreaded upgrading and hoped to never have to (generally speaking of course), but I guess I'll take the time to do things proper to avoid this in the future.
One last note, not sure if you're aware but album titles can't have apostrophes in them or things bork. At least in my version.
Hi did this feature get added? I have the latest SVN of ImageGalleryPage.php, how can include the Album Description of each page please?
I tried:
<% control Albums %>
<p>$Description</p>
<% end_control %>
&
<% control Albums %>
<p>$AlbumDescription</p>
<% end_control %>
But produces all or nothing. Thanks!
What do you mean "all or nothing?" Do you just want to show the description of the current album? You should be able to use <% control CurrentAlbum %>.. I would think.
Yeah sorry all or nothing was a bit cryptic! I meant all descriptions or none.
But anyway you solved it thanks!! CurrentAlbum not Albums! makes sense! :)