1

I am working on a SDL Tridion and I am new to Tridion. I create many pages and a Navigation menu but I am facing a problem on attaching this on each page, and to create linking on click of navigation menu tab between pages.

3
  • 1
    There are many ways of handling navigation ... what have you tried and what format is your navigation in? Feb 27, 2014 at 13:16
  • 2
    This question appears to be off-topic because it is implementation-specific (tridion.stackexchange.com/help/on-topic).
    – Ant P
    Feb 27, 2014 at 13:17
  • I create navigation menu on my template building block by html coding and create a separate pages for this. Feb 27, 2014 at 13:24

3 Answers 3

3

What you want to avoid here is having to republish every page each time the navigation changes. It sounds like you are including the navigation as a TBB in each page, which is inefficient.

In this situation, in my mind anyway, you want the navigation to be a page in its own right. You can then include that in your page template (via a JSP/.NET include or a custom tag).

Have a look at http://yatb.mitza.net/2013/08/simple-xmlxslt-navigation.html -- which seems to be broadly what you're trying to achieve.

This example outputs an XML file and transforms it using XSLT. The advantage of that approach is that you have one file for navigation that you can republish whenever suits. Using XML/XSLT means you can include some logic to highlight the current page (class="active") or whatever.

Note this is not the way to handle navigation in Tridion. Many other options are available, for example using taxonomy, but this seems to be the closest match to what you're trying to do, as far as I can glean from your question.

2

if i understand your questions right & you are using a .net solution. you can give try to following.

  • You can publish XMl of your navigation in .sitemap format
  • Create UserControl and use the asp:menu control in that usercontrol
  • Add that user control to your master page

examples: Xml format

 <?xml version="1.0" encoding="utf-8" ?>   <siteMap
 xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >  
     <siteMapNode url="Default.aspx" title="Home"  description="Home Page">  
       <siteMapNode url="StandardToolBox.aspx" title="StandardToolBox" description="StandardToolBox Controls">  
         <siteMapNode url="AdRotatorExample.aspx" title="AdRotator"  description="AdRotator Example" />  
         <siteMapNode url="BulletedListExample.aspx" title="BulletedList"  description="BuulletedList Example" />

.

<asp:SiteMapDataSource ID="sitemapDS" runat="server" SiteMapProvider="MenuProvider" ShowStartingNode="false"/>
<asp:SiteMapDataSource ID="sitemapDS2" runat="server" SiteMapProvider="MenuProvider" ShowStartingNode="false" StartFromCurrentNode="true" />

<asp:Menu Orientation="Horizontal" ID="PrimaryNav" runat="server" DataSourceID="sitemapDS" StaticSelectedStyle-Font-Bold="true" MaximumDynamicDisplayLevels="0" OnMenuItemDataBound="PrimaryNavItemDataBound" mol_css_class="sea clearfix" mol_css_id="mainNav" />  
2

You need to have Content Delivery to resolve Component links and Page links on the website.

On Navigation TBB, you need to render the hyperlinks in the form of TCDL tags. Where Content deployer will change TCDL tags cooresponding to your Component Link and Page Link Controls on the published page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.