Developer forum

Forum » Templates » Internal links not parsed in content from global paragraph tags

Internal links not parsed in content from global paragraph tags

Morten Bengtson
Reply
Hi,

I have a weird issue with customized URLs. The following example has been simplified...

I have a master template where I insert global content like this:
<!--@Global:Paragraph.Content(123)-->

Paragraph 123 contains a simple internal link to an existing page:
<a href="/Default.aspx?ID=1">This link is not parsed - no customized URL :(</a>

Problem: The link is not parsed (no customized url), so it will come out exactly as it is - no matter what I do.

Is this a bug? Does anyone know a workaround to this?

/Morten

Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer
Global paragraphs are inserted after the the URL replacement - I'm aware of the issue, but do not want to change it in a service release since it can potentially break running solutions.

You can do something like this on the Notifications.Standard.Page.AfterOutput notification:
Dim OutReplacer As New OutputReplacer
globalTemplate.Html = OutReplacer.ParseURLs(globalTemplate.Output, Pageview.Current)

But - there is a minor performance loss on that. You can alternatively enable the "Ensure unique" path option in management center which will 301 Default.aspx?ID=123 to its correct URL.
Votes for this answer: 0
 
Morten Bengtson
Reply
Thanks, I'll try "Ensure unique path" then :)

/Morten

 

You must be logged in to post in the forum