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.

How do I express in phtml {{url ('') }} ?

I want to use {{url ('')}} in my phtml forms but can not find the correct syntax as express this:

<div align="right">
    {{ link_to("spm_contacto/new", "<img src='{{ url('img/tolbar/Package-accept-icon.png') }}'> Añadir un nuevo Empleado") }}
edited Oct '15

for url


for link_to

$this->tag->linkTo("products/search", "Search")


How to join the two because I want to put the address of the image within link_to I want a link with a static imgen in all directions?

Maybe you want this:

<div align="right"><a href="{{ url('spmcontacto/new') }}" alt="Añadir un nuevo Empleado"><img src="{{ url('img/tolbar/Package-accept-icon.png') }}" /></a></div>

edited Oct '15


{{ link_to("spmcontacto/new", "<img src='"~url("img/tolbar/Package-accept-icon.png")~"'> Anadir un nuevo Empleado) }}


<?php echo $this->tag->linkTo("spmcontacto/new", "<img src='" . $this->url->get("img/tolbar/Package-accept-icon.png") . "'> Anadir un nuevo Empleado") ?>


Thank you, yes run as needed, but it seems it is easier to work with volt but due to the syntax checker phtml use netbeans