azarbara
  • Posts: 45
  • Joined: 30/10/2011
Hi,
by default all of subforums are expanded, but i want to collapse subforums (highlighted sections in below image) in first load.
any idea please
forum collapse
Mathematics site in Persian language: http://rayeshmand.ir 
Sponsor
azarbara
  • Posts: 45
  • Joined: 30/10/2011
any idea please!
Mathematics site in Persian language: http://rayeshmand.ir 
Zero2Cool
  • Posts: 1082
  • Joined: 26/04/2011
Not sure, but a good starting point would be here.

YAF.Controls.ForumCategoryList

ForumCategoryList.ascx
azarbara
  • Posts: 45
  • Joined: 30/10/2011
Originally Posted by: Zero2Cool 



ForumCategoryList.ascx



i could not make any change in this ascx!

                            <YAF:CollapsibleImage ID="CollapsibleImage" runat="server" BorderWidth="0" ImageAlign="Bottom"
                                PanelID='<%# "categoryPanel" + DataBinder.Eval(Container.DataItem, "CategoryID").ToString() %>'
                                AttachedControlID="forumList" ToolTip='<%# this.GetText("COMMON", "SHOWHIDE") %>' />

in the browser the above code in collaps mode was rendered to

<input type="image" name="dnn$ctr414$YafDnnModule$ctl00$ctl03$ForumCategoryList$CategoryList$ctl01$CollapsibleImage" id="dnn_ctr414_YafDnnModule_ctl00_ctl03_ForumCategoryList_CategoryList_CollapsibleImage_0" title="نمایش/عدم نمایش" src="/DesktopModules/YetAnotherForumDotNet/Themes/yafpro/expand.gif" align="bottom" style="border-width:0px;" pmbx_context="2C854D78-2362-4149-B8E9-487FD0A2C4FB">

and in the expanded mode there is

<input type="image" name="dnn$ctr414$YafDnnModule$ctl00$ctl03$ForumCategoryList$CategoryList$ctl02$CollapsibleImage" id="dnn_ctr414_YafDnnModule_ctl00_ctl03_ForumCategoryList_CategoryList_CollapsibleImage_1" title="نمایش/عدم نمایش" src="/DesktopModules/YetAnotherForumDotNet/Themes/yafpro/collapse.gif" align="bottom" style="border-width:0px;" pmbx_context="F5A2EA9A-DECE-4D7A-8972-F160DDAB557A">

Mathematics site in Persian language: http://rayeshmand.ir 
tha_watcha
  • Posts: 4130
  • Joined: 06/03/2010
All you need to do is add the defaultstate attribute to the CollapsibleImage Control

<YAF:CollapsibleImage ID="CollapsibleImage" runat="server" BorderWidth="0" ImageAlign="Bottom"
                                PanelID='<%# "categoryPanel" + DataBinder.Eval(Container.DataItem, "CategoryID").ToString() %>'
                                AttachedControlID="forumList" ToolTip='<%# this.GetText("COMMON", "SHOWHIDE") %>' DefaultState="Collapsed" />

UserPostedImage
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    About Us

    The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

    Powered by Resharper Donate with PayPal button

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved