YAFLogo

rocky
  • rocky
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
11 years ago
Hello Team,

I am using YAF and want to add new menu on top of site and also provide a new link with a fresh page.

So,how it can possible i feel here page's name are made in GetPageSource() function under

Classes\ forum.cs page.if anyone have suitable answer please let me know as soon with suitable example,response will appreciable.

Thanks

Regards,

Rocky tom

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Hello Team,

I am using YAF and want to add new menu on top of site and also provide a new link with a fresh page.

So,how it can possible i feel here page's name are made in GetPageSource() function under

Classes\ forum.cs page.if anyone have suitable answer please let me know as soon with suitable example,response will appreciable.

Thanks

Regards,

Rocky tom

Originally Posted by: rocky 

If you want to add an page link to the header you need to modify the controls\YafHeader.ascx

there is an ul list


<div class="menuContainer">
            <ul class="menuList">
                <asp:PlaceHolder ID="menuListItems" runat="server">
                </asp:PlaceHolder>
            </ul>

after/before the place holder you can add your custom link


<div class="menuContainer">
            <ul class="menuList">
                <asp:PlaceHolder ID="menuListItems" runat="server">
                </asp:PlaceHolder>
                <li class="menuGeneral">
                    <a href="link">Link</a>
                </li>
            </ul>

If you want to add the link between the existing links you need to modify the code behind file YafHeader.ascx.cs in the private function RenderMainHeaderMenu. there you can add your custom link (look at the existing code how its done).

Is the page you want to link to outside of yaf or inside yaf? If the link should go to a custom page inside yaf, you should read this little guide on how to create a custom page first...

http://forum.yetanotherforum.net/yaf_postsm52957_Create-a-custom-page.aspx#post52957 

rocky
  • rocky
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
11 years ago
Thanks,i solved that issue .

your comments are very useful.

Thanks alot 🙂

tyhaitrieua
10 years ago
thank for tha_watcha