System:Template:createLink

From Aspen Documentation

Used in creating a full anchor element of inter-framework links.

Since 1.0

Contents

Arguments

string createLink (string $text [string $method = false], [array $bits = false], [string $module = false], [string $interface = false])

text
The text that will be used as the html content of the anchor.
method
The class method ("page") to generate a link to. If left false, it will generate a link to the current method.
bits
An array of values to append to the url. For example, array('id'=>1) will append either: /page/1 or &method=page&id=1.
module
The module the method exists within. If left false, the current module is assumed.
interface
The interface the module exists within. If left false, the current module is assumed.

Returns

Returns an html anchor with an absolute url as a string.

Notes

  • Returns XHTML compliant markup.

Examples

Generating a link to the view page of the users module:

$this->createLink('View Users', 'view', false, 'Users');