Templates: Junecode: createlink

This documentation was updated on Tuesday, February 24, 2009 at 3:28 AM

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="" 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 templates: junecode: createlink
This site was created with Junecode. Copyright © 2010–2023 Junecloud LLC.