Jump to content

AtkParserAttribute

From NusaATK

Attribute: atkParserAttribute

API docs | Flags

List of other attributes

File:AtkParserAttribute.png
atkParserAttribute screenshot

Description

The atkParserAttribute can be used to create custom output, such as a label, image or link to display.

Params

$name - How to refer to this attribute $text - The text to display, this can contain template markup to add data values $flags - The attribute flags


Examples

Creating an avatar_preview that shows the image in a given location as a readonly item.

$this->add(new atkParserAttribute("avatar_preview",'<img src="'.atkconfig('avataruserpath').'[user.user_id]/small.jpg" />', AF_HIDE_LIST|AF_HIDE_ADD));