<txp:permlink /> sing/cont tag, 4 attributes

permlink

The permlink can be used as a single tag or a container tag to return the permanent url of the article being displayed.

If used as a container tag, the HTML required to output a hyperlink is returned; if used as a single tag, only the url itself is returned.

attributes

id="unset" 
  • The article ID to link.
class="unset" 
  • CSS class attribute.
style="unset" 
  • Inline CSS style definition. Recommended that you use CSS via class attribute instead.
title="unset" 
  • HTML title attribute.
<txp:permlink /> 3 examples

Container tag

<txp:permlink><txp:title /></txp:permlink> 

would result in something like:

<a href="http://example.com/index.php?id=2">Article title</a> 

Other tags used: title

Single Tag

<txp:permlink /> 

would result in something like:

http://example.com/index.php?id=2

Customizing Permanent Links

By default permlink returns only a very basic link, which doesn’t allow for customizing the link title, or adding a CSS class, etc. Using the tag in its single tag capacity opens up a lot more possibilities.

For example, to have the permanent link have an HTML title attribute of the article’s title, and also apply a class to it named “orange”:

<a href="<txp:permlink />" title="<txp:title />" class="orange"><txp:title /></a> 

Other tags used: title