I too have the same questions. Any ideas?
Thanks
Jeremy
Go to file Themes\Default\Galleries\grouplist.aspx
FInd the <ItemTemplate> for the GalleryList control.
<
I copy the entrie section here:
Hope this helps.
Kunlun
Thanks, Kunlun,
This works for grouplist. What about the gallerylist? How to define the QueryOverrides so that only the gallery with pictures will show up on the list?
Qingsong,
For a quick fix, just go to ~\web\themes\default\\galleries\gallerylist.aspx, and set the visibilty to false for those galleries with no photo posts.
Here is the partial code for the changes below. The only snag is that this approach does not change the totoal item number displayed below the list. The right way to do this is to do at the databinding level, i.e., remove the empty galleries from the data source before bind it to the custom control.
Holp this helps,
===========================================================================
==========================================================================
Can we use <QueryOverrides> to filter out those empty galleries?
What will be the fileter name?
QueryOverrides does not have a defined property or method that can be used to filter out the empty Galleries. It does have a filter called "applyUserGroupFilter". Then we have define a groupQuery first and set the ApplyUserGroupFilter=True.
Nice feature, Kunlun, thanks for sharing.
Regards.
I found a better solution in CS2007. In /theme/yourtheme/galleries/grouplist.aspx, there is a GalleryList control. Inside the <ItemTemplate>, just before the existing markup, add this:
<CSControl:PlaceHolder runat="server"> <DisplayConditions><CSControl:SectionPropertyValueComparison ComparisonProperty="PostCount" ComparisonValue="0" Operator="GreaterThan" runat="server" /></DisplayConditions> <ContentTemplate>
Then right before the </ItemTemplate>, add this:
</ContentTemplate></CSControl:PlaceHolder>
That will wrap everything in a PlaceHolder control, which will only display if the Section's PostCount is greater than 0.
This technique will also work on other areas of the site.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com