How can I include sitemap breadcrumb in my Tridion page?

370 views Asked by At

I used to write

<asp:SiteMapPath ID="SiteMapPath1" Runat="server" />

in my .net application to show the navigation site map breadcrumb. Can anyone please tell me how to use this type of functionality in Tridion page? Or should I use this as a user control and add it to my page?

And one more thing as you see download PDF link in the image. How can I link this text to my respective PDF file placed in building block folder? Should I write tcm id of the file(multimedia component) like this?

<a href="tcm id of file" > Download PDF </a>

Would this be the correct approach?

enter image description here

2

There are 2 answers

1
Nuno Linhares On BEST ANSWER

OK, you have 2 questions in here - these should really be 2 separate questions. Moving on.

There's nothing stopping you from using <asp:SiteMapPath> from a website that uses Tridion - as long as you have a SiteMap provider and you create the required navigation.sitemap (or whatever .NET calls it).

Alternatively, you could create your breadcrumb at publish time by determining the location of your page in the website like I explain in this post.

For your pdf download, yes, you should have a template in Tridion generating those <a tridion:href="@@Component.ID@@"><img src="images/pdf.png" /></a> or something like that. Don't go hard-coding your TCM Uris please.

0
Nickoli Roussakov On

Have a look at this article that explains how to publish a Sitemap data source XML from Tridion. You can then use it with standard .net navigation user controls.: http://www.tridiondeveloper.com/web-sitemap