written by Jian Huang, 7. December 2011
Allow a page, even a non navigation page, to display the exact navigation area as displayed on any page.
When a page is not in navigation manager, the page cannot display navigation because it is not part of navigation manager.
However, a page should not be in navigation manager simply because it needs to display navigation. For example, news article pages should not be in navigation manager because number of navigation pages in navigation manager negatively impacts project performance.
However, news article pages must display navigation area for the shake of accessibility. Hence, news article page can use navigation emulation to emulate the navigation of its parent page, the new archive page.
<!IoRangeDynLink> <!IoRangeNoRedDotMode><!IoRangeRedDotMode><%anc_link%><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode> <%!! Navigation:OutputArea(LeftNavArea, Bool:True, Guid:<%inf_page_guid%> !!%> <!/IoRangeDynLink>
<reddot:cms> <if> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- This Page is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.Id, Bool:False) !!%> </htmltext> </query> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage.MainLink.OwnerPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- The Page 1 Level Up is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.MainLink.OwnerPage.Id, Bool:False) !!%> </htmltext> </query> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- The Page 2 Levels Up is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.Id, Bool:False) !!%> </htmltext> </query> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- The Page 3 Levels Up is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.Id, Bool:False) !!%> </htmltext> </query> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- The Page 4 Levels Up is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.Id, Bool:False) !!%> </htmltext> </query> <query valuea="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage).GetRootIndex().Id" operator="==" valueb="Context:Indexes.RootIndexList[Int:0].Id"> <!-- The Page 5 Levels Up is in Navigation Structure --> <htmltext> <%!! Navigation:OutputArea(Left Navigation, Bool:False, Context:CurrentMasterPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.MainLink.OwnerPage.Id, Bool:False) !!%> </htmltext> </query> </if> </reddot:cms>
Source: Navigation Emulation
© copyright 2011 by Jian Huang