i created an apicontroller in order to allow umbraco content to be pulled from umbraco to another external non-umbraco site.
The one issue i spotted in the content retrieved was that hyperlinks within the bodyText are set to retrieve a particular piece of content from umbraco but of course will not work out of the umbraco context.
i.e.
<a href='/{localLink:1260}'
As i know the page id being linked to, i am able to get the string within the { } and identify the id. I would then simply need to find the appropriate page within umbraco and grab the url property and do a replace on the umbraco link within the bodytext.
However within the apicontroller the currentpage property is not available so i am not sure if i can locate what page equates to id 1260....
is there a way around this? or an alternative way to achieve what im trying to do?
UmbracoApiController
i created an apicontroller in order to allow umbraco content to be pulled from umbraco to another external non-umbraco site.
The one issue i spotted in the content retrieved was that hyperlinks within the bodyText are set to retrieve a particular piece of content from umbraco but of course will not work out of the umbraco context.
i.e.
As i know the page id being linked to, i am able to get the string within the { } and identify the id. I would then simply need to find the appropriate page within umbraco and grab the url property and do a replace on the umbraco link within the bodytext.
However within the apicontroller the currentpage property is not available so i am not sure if i can locate what page equates to id 1260....
is there a way around this? or an alternative way to achieve what im trying to do?
Use:
thanks
that is deprecated but its successor, TemplateUtilities.ParseInternalLinks worked fine
is working on a reply...