System:Template:createSelfLink

From Aspen Documentation

Creates a link to the current page with params, replacing any existing params

Since 1.0

Contents

Arguments

string createSelfLink ( $text, [ $bits = false], [string $method = false])

text
The text that will be used as the html content of the anchor.
bits
An array of key/values that will override current key/values in the GET request.
method
The class method ("page") to generate a link to. If left false, it will generate a link to the current method.

Returns

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

Notes

  • As described in bug 1199 this function will not currently work with clean url support enabled.

Examples

$this->createSelfLink('Toggle GET Value',array('toggle'=>!$this->APP->params->get->getInt('toggle')));