Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I include sitemap breadcrumb in my Tridion page?

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

like image 708
AmateurCoder Avatar asked Dec 21 '22 21:12

AmateurCoder


1 Answers

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.

like image 155
Nuno Linhares Avatar answered Jan 28 '23 23:01

Nuno Linhares