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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Getting Description On Album Page


Reply

8 Posts   1285 Views

Avatar
Liam

3 July 2009 at 4:06pm Community Member, 470 Posts

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

4 July 2009 at 4:31am 4085 Posts

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

Avatar
Liam

4 July 2009 at 4:39am Community Member, 470 Posts

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

4 July 2009 at 9:08am 4085 Posts

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

4 July 2009 at 11:42am Community Member, 470 Posts

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

15 January 2010 at 11:09pm Community Member, 168 Posts

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

16 January 2010 at 3:30am 4085 Posts

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

16 January 2010 at 5:10am Community Member, 168 Posts

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