Try our conversational search powered by Generative AI!

Navbar

Vote:
 
Which control in episerver 4 does the same job as navbar in episerver 3? An example would be nice I have played around with PageTree but I cant seem to get it quite right. Its basically the same functionality that is used on ths Developer forum at the top of this page.. / Developer Community / Developer forum / Developer to developer / Im guessing a simple while loop would do it - but since there is no mention of navbar in this forum it would be nice for those also upgrading to get help on upgrading issues.
#12164
Nov 15, 2004 11:32
Vote:
 
Have you tried the MenuList control? I have been using this control for our row of top navigation. You simply supply a page link to populate from and all pages below the supplied page are included (not including child pages and not including pages hidden from menus) so it works well for top level navigation. Hope this helps :)
#13786
Nov 15, 2004 21:01
Vote:
 
Hi, thanks but thats not really what I am looking for... Im looking to do the same thing that is done at the top of this developer forum page... For example: Navbar is a page under Developer to Developer and its parent is Discussion for developers and its parent is Developer forum.. Developer Forum / Discussion for developers / Developer to developer / Navbar Typical PageTree will give you: Root +--Child1 +--Child2 +--Child3 +--Child1 of Child3 +--Child2 of Child3 +-- Child1 of Child2 of Child3 I want to display Child3 / Child 2 of Child 3 / Child 1 of Child2 of Child3 .. just the single thread. The NavBar control of EPiServer 3.x gave me just that but I dont see any of the standard EPiServer 4.x controls giving me the same result - unless I have missed something really obvious. I know there are expand and collapse functions but I was hoping for a simple solution. I havent spent much time on it - my first action was to check here and since there was no mention of it I started a thread and hopefully help others who will be looking at converting the NavBar control. Nice website update - no wonder nobody was around to answer this simple one yesterday!
#13787
Nov 16, 2004 11:49
Vote:
 
OK - as suspected a simple loop does the trick - but it would be nice to know if an EP4 control retained this functionality? protected string GetParentListFromChild(PageReference childNode) { string s = ""; PageData oPage = GetPage(childNode); s = "/" + oPage.PageName; while (oPage.ParentLink != PageReference.EmptyReference) { PageData oParentPage = GetPage(oPage.ParentLink); s = "/" + oParentPage.PageName + "" + s; oPage = oParentPage; } return s; }
#13788
Nov 16, 2004 14:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.