I have a site that we have implemented alternate path naming and file naming as properties for the use of SEO. Basically when navigation and footer code renders a macro swaps the real page name and path with the data stored in string properties. I have now been asked if it is possible to intercept any hyperlinks the content editor adds to the content and change them to use the same path structure. I was hoping I could just create a macro that is run on every page and identifies the links and translates them, but the "http://{LocalLink:id}" that shows in the editor does not seem to exist in the xml for the content node. Is there a way I can do this?
I'm attempting to do the same thing, and I followed the steps provided in the "how to customize niceurl" thread. However, an issue occurs whenever the field has a macro embedded inside of it (i.e. bodyText has a SiteMap macro). If I look at the output HTML I see
<?UMBRACO_MACRO macroAlias="SiteMap" />
The macro exists, it just isn't processing it. I have implemented the behavior in Python and C# (Python was the original implementation), and get the same result. The UMBRACO_MACRO definition is not being wrapped by < and >. I attempted to do a Regex looking for UMBRACO_MACRO, and if found perform a RenderMacroContent. However, this does not work in either C# or Python (displays nothing even though the parameters are correct).
modifying content hyperlinks
Hello All,
I have a site that we have implemented alternate path naming and file naming as properties for the use of SEO. Basically when navigation and footer code renders a macro swaps the real page name and path with the data stored in string properties. I have now been asked if it is possible to intercept any hyperlinks the content editor adds to the content and change them to use the same path structure. I was hoping I could just create a macro that is run on every page and identifies the links and translates them, but the "http://{LocalLink:id}" that shows in the editor does not seem to exist in the xml for the content node. Is there a way I can do this?
Thanks.
Hi,
I responded to a similer question here http://our.umbraco.org/forum/using/ui-questions/4045-How-to-customize-niceurl#comment14519
My comment suggests implementing a ParseLocalLinks extension.
Cheers,
Chris
Thanks Chris.
remember to vote or solve posts if you feel they were useful ;-)
I'm attempting to do the same thing, and I followed the steps provided in the "how to customize niceurl" thread. However, an issue occurs whenever the field has a macro embedded inside of it (i.e. bodyText has a SiteMap macro). If I look at the output HTML I see
The macro exists, it just isn't processing it. I have implemented the behavior in Python and C# (Python was the original implementation), and get the same result. The UMBRACO_MACRO definition is not being wrapped by < and >. I attempted to do a Regex looking for UMBRACO_MACRO, and if found perform a RenderMacroContent. However, this does not work in either C# or Python (displays nothing even though the parameters are correct).
Suggestions?
is working on a reply...