Developer forum

Forum » Templates » Menu items to pages who are an internal link

Menu items to pages who are an internal link

Ben Doorn
Reply

Hi,

I notices when a page is rendered in a navigation tag and that page is actually an internal link to another page there is no field in the navigation xml containing the ID of the linked page. This then alway results in a redirect to the actual page, is there a possibility to add the ID to the xml or a setting that can alter the ID in the Href or FriendlyHref attributes in the XML data? 

Kind regards,

Ben


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

+1

This would make it possible to create a nice and organized virtual menu structure with menu items pointing to pages anywhere in the site.

Imar

 

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Ben

If you use the Href attribute you get the destination page.

If you use the FriendlyHref attribute, you get the URL of the navigation item that gives you 301.

This is by design (DC things, sitemap.xml etc.)

You can just use the Href attribute. Dynamicweb will rewrite the urls to the friendly ones for you, so no need to use FriendlyHref attribute

Votes for this answer: 1
 
Ben Doorn
Reply

Hi Nicolai,

That will do the trick. Tried this on the virtual menu structures we created for one site and the 301 redirects are removed. This will result in a slightly improved performance. Thanx.

Ben

 

You must be logged in to post in the forum