QUESTION:

How do I add a target attribute to links?
How do I add a rel attribute to links?



ANSWER:

You can use the PR Block plugin to add rel, target and similar attributes to links.

Here’s a simple method of making all links contained within an article body open in a new window:

<txp:zem_prblock target="_blank">
<txp:body />
</txp:zem_prblock>

The plugin will modify any <a href=...> tags it encloses, so you can wrap the zem_prblock tag around a txp:linklist tag, for example.

For a standards-compliant solution, use the PR Block plugin to add a rel="external" attribute to links:

<txp:zem_prblock rel="external>
...
<txp:zem_prblock>

Then use javascript to make all rel="external" links open in a new window.