User Tools

Site Tools


bigace:developer:viewhelper:tpl

Table of Contents

tpl()

The tpl ViewHelper returns an absolute URL inside the current templates folder. Should be used to create links to resources like images.

→ Since BIGACE 3.0

Further infos at the ViewHelper tpl() PHPDoc.

Attributes

  • $url - (optional, string)

Returns either the URL to the given $url inside the public template folder OR (if $url === null) the ViewHelper itself.

Example

This example shows how to adress an public template image:

  <img src="<?php echo $this->tpl('img/header.jpg'); ?>" alt="Logo" />
bigace/developer/viewhelper/tpl.txt · Last modified: 2011/02/22 11:41 by bigace