Toggle Minimized View
Search

Templates: Junecode: createlink

This documentation was updated on February 24th, 2009

Inserts an HTML link created with the specified values. This allows much greater control than simply creating a link manually.

Attributes

href: the URL to use for the link.
text: the text to use as the linked text.
case: upper or lower. Will convert the output to uppercase or lowercase. The default is none.
decode: true or false. If set to true, HTML entities in the text will be decoded. The default is false.
emptytext: true or false. If set to false and no href is specified, the text attribute is not inserted. The default is true, which inserts the text even if there’s no link.
emptyspan: true or false. If set to true, a <span> tag is wrapped around the text if there’s no link. The default is false.
other arguments are simply passed along as part of the <a> tag.

Example

<junecode:createlink href="" text="createlink" decode="true" />

Note that in this example, the entrytitle tag is set to encode HTML entities, and the createlink tag is set to decode them. This might seem useless, but it’s actually quite important! If you don’t do this, and your link text includes a quote or HTML bracket, you’ll run into problems.

You are here: Junecode: about: design: junecode: createlink
Can’t find what you need? View a complete site map