Ways to alter links on a Plone site

I'm looking for a way to alter links on a Plone site. Basically if a link matches a specific pattern it should be replaced with something else.
I see my options as:

  • Diazo - just do some fancy footwork with XSLT
  • Javascript
  • Intercept some kind of traversal event

I'm especially interested in ideas related to the third option because I don't want to be tied to my theme.

If you want to do this server side I would suggest considering the implementation of a dedicated portal transform.

I think you can take some inspiration from:

1 Like

I'd be inclined to hacking some JS :slight_smile:

But a portal transform or this https://plone.org/products/collective.routes would be more politically correct :smiley:

Whats the source of the links?

@jensens,
These would be from content or the navigation bar. I can see that if it were in the theme that might be a problem for a transform.