Hello,
In CS 2007, the GalleryListing.aspx (All Galleries page) shows the following columns:
Gallery
Last Changed
Photo Count
Is there a way to add the description and a thumbnail random picture? I figured out how to add a new column with a custom header name...just need to add the data of the description and thumbnail.
Thanks,
iCareCommunity
I got it working by adding the following code to the gallerylisting.aspx:
Could you post all the steps you took to get this working.
Much appreciated!
icare...first off cool idea i hadn't even thought of doing this but it looks good...in any case i was wondering if you knew how to get the pic to link to the gallery instead of the actual picture. I tried just throwing ViewGallery in there but it didn't like that.
tmiller...to do this you will want to find themes/default/galleries/gallerylist.aspx
then to create a new column find the header template and add you a new column mine is in bold and it would be the second one.
<HeaderTemplate> <table width="100%" cellpadding="0" cellspacing="0"> <thead> <tr> <th class="CommonListHeaderLeftMost" width="*"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_Gallery" runat="server" /></th> <th class="CommonListHeader" align="center" width="*"><CScontrol:ResourceControl ResourceName="Gallery_AggregateGalleryListing_Random_Pic" runat="server"/></th> <th class="CommonListHeader" align="center" width="150"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_LastChanged" runat="server" /></th> <th class="CommonListHeader" align="center" width="150"><CSControl:ResourceControl ResourceName="Gallery_AggregateGalleryListing_PictureCount" runat="server" /></th> </tr> </thead> <tbody> </HeaderTemplate>
If you notice ResourceName="something" this is the text of your column and refers to the name defined in languages/en-us/resources there are some threads out there on how to do this if you dont know.
Now find your item template and throw that code in there mine is in bold and i have made a few changes to the one above ie. used a thumbnail instead but either one would work. You will also want to add the code to the alternating item template in the same spot.
<ItemTemplate> <tr class="CommonListRow"> <td class="CommonListCellLeftMost" align="center"> <CSGallery:GalleryData runat="server" LinkTo="ViewGallery" Property="Name" /><br /> <CSGallery:GalleryData runat="server" Property="Description" /> </td> <td class="CommonListCell" align="center"> <CSGallery:GalleryPostData LinkTo="ViewPicture" UseRandomPost="True" runat="server" Tag="div"> <ContentTemplate> <CSGallery:GalleryPostImage ImageType="Thumbnail" runat="server" /> </ContentTemplate> </CSGallery:GalleryPostData><br /> </td> <td class="CommonListCell" align="center"><CSGallery:GalleryData runat="server" Property="MostRecentPostDate" IncludeTimeInDate="true" /> </td> <td class="CommonListCell" align="center"><CSGallery:GalleryData runat="server" Property="TotalThreads" /></td> </tr> </ItemTemplate>
If you want to see it in action i check out my site link below! hope this helps feel free to ask any questions
peace shakes
Carolina Pulse
Thanks Shakes, worked like a champ!
Does it have to be a random picture? What happens if you set UseRandomPost="false?" Can it be the first picture that is uploaded?
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com