We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

link_to with css attributes

edited Jul '17

Are you looking for something like this?

<?php echo \Phalcon\Tag::linkTo(['products/edit/10', 'Edit', 'class' => 'edit-btn']) ?>

and in Volt

{{ link_to(['products/edit/10', 'Edit', 'class':'edit-btn']) }}

No, using this:

{{ link_to(['for':'some-route', 'param':'param'], 'Edit') }}


98.9k

how to create links based on routes?

No, link based on routes with css attributes...



98.9k
{{ link_to(['for':'some-route', 'param':'param'], 'Edit', 'class': 'my-fav-class', 'style': 'font-size:18px') }}

Hm, it seems I've tried this =), thanks, i will try tomorrow...