From Umbraco, editors may add links to local Umbraco pages. Using Razor, I'm trying to render the Content Body property as HTML with local links parsed to their corresponding friendly urls. If I wasn't using uSiteBuilder, I could just use the Umbraco.Field() method and the output would be correct. When using uSiteBuilder, the following would be render for local links:
<a href="/{localLink:1075}">Link Text</a>
Is there anyway to parse the property and turn local link references into nice urls?
uSiteBuilder and RTE local links not rendering correctly
So I have a document type class with a Rich Text Editor content property as follows:
From Umbraco, editors may add links to local Umbraco pages. Using Razor, I'm trying to render the Content Body property as HTML with local links parsed to their corresponding friendly urls. If I wasn't using uSiteBuilder, I could just use the Umbraco.Field() method and the output would be correct. When using uSiteBuilder, the following would be render for local links:
<a href="/{localLink:1075}">Link Text</a>
Is there anyway to parse the property and turn local link references into nice urls?
Okay so that was a major fail. The href attribute of the link actually prints out {localLink:1075} and not a link to the wiki page.
I managed to fix this issue by creating a string extension method as follows to parse links within a document type class.
is working on a reply...