Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Call Phalcon function Tag

I want to call Tag Phalcon function, with Tag.

I saw many example on internet with this :

use Phalcon\Tag as Tag;

But to have access to Tag, you must put this in all phtml file :

Can we put this syntax in one file, and it will be available in the project everywhere ?


you can also use it as $this->tag in view, if its cleaner that way for you, like:

$this->tag->linkTo('news/'.$new->getUri(), $new->title)


It's ok, the syntax is clean like this.