azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2015-02-23T07:23:26Z
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
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2015-02-25T15:02:02Z
any idea please!
Mathematics site in Persian language: http://rayeshmand.ir 
Zero2Cool
2015-02-25T18:27:56Z
Not sure, but a good starting point would be here.

YAF.Controls.ForumCategoryList

ForumCategoryList.ascx
azarbara
  •  azarbara
  • 81.2% (Honored)
  • YAF Lover Topic Starter
2015-02-25T20:14:26Z
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
2015-02-26T11:29:37Z
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

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