Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • radmanmm 117 posts 108 karma points
    Oct 27, 2009 @ 14:29
    radmanmm
    0

    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.

  • Chris Koiak 700 posts 2626 karma points
    Oct 27, 2009 @ 14:46
    Chris Koiak
    1

    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

  • radmanmm 117 posts 108 karma points
    Oct 28, 2009 @ 17:56
    radmanmm
    0

    Thanks Chris.

  • Chris Koiak 700 posts 2626 karma points
    Oct 28, 2009 @ 18:47
    Chris Koiak
    0

    remember to vote or solve posts if you feel they were useful ;-)

  • Ben Everett 1 post 21 karma points
    Nov 23, 2009 @ 23:01
    Ben Everett
    0

    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 &lt; and &gt;. 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?

Please Sign in or register to post replies

Write your reply to:

Draft