Developer forum

Forum » Development » Prevent DW from messing with links?

Prevent DW from messing with links?

Aki Ruuskanen
Aki Ruuskanen
Reply

I need to add a cross domain canonical link to a solution.

I create my tag with :

canonicalTag = string.Format("<link rel='canonical' href='{0}'>", canonicalLink);

I output it but DW adds stuff to the "href" attribute so I end up with a tag looking like

<link rel='canonical' href='/Files/Templates/Designs/MyDesign/http://mydomain.se/Hem.aspx'>

I tried with the <head data-settings="disableparsing:true"> but no luck.

Version of DW is 8.7.

Any ideas?

 

Regards / Aki

 

 

 


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

I think this is happening already when the template gets parsed.

Try something like this: string.Format("<link rel='canonical' {1}='{0}'>", canonicalLink, "href");

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Thanks, that did it! Excellent!

 

You must be logged in to post in the forum