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.

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


Go to End


8 Posts   1603 Views

Avatar
Liam

Community Member, 470 Posts

3 July 2009 at 4:06pm

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?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

4 July 2009 at 4:31am

Oooh.. good idea. I've checked that into SVN for you.

Avatar
Liam

Community Member, 470 Posts

4 July 2009 at 4:39am

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

4 July 2009 at 9:08am

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.

Avatar
Liam

Community Member, 470 Posts

4 July 2009 at 11:42am

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.

Avatar
pinkp

Community Member, 182 Posts

15 January 2010 at 11:09pm

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!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 January 2010 at 3:30am

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.

Avatar
pinkp

Community Member, 182 Posts

16 January 2010 at 5:10am

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! :)