This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » eZ Publish 5 Platform » [Twig] - Custom attributes on ezurl...

[Twig] - Custom attributes on ezurl fieldtype rendering

[Twig] - Custom attributes on ezurl fieldtype rendering

Thursday 19 June 2014 11:32:28 pm - 2 replies

I would like to be able to set custom classes, or other attributes, on the ezurl FieldType using ez_render_field(). Is this possible? Currently there is no documentation on the ezurl type ( 
Ideally, my code would look something like this: 

 {{ ez_render_field( content, 'button', {'class': 'button'} ) }}

Friday 20 June 2014 1:02:16 am

Take a look at


Looks like you want to pass a hash with "attr" => array( "class" => "button" )


Of course using twig syntax

Modified on Friday 20 June 2014 1:05:08 am by Douglas Hammond

Friday 20 June 2014 3:22:40 pm

Works great, thanks!

 {{ ez_render_field( content, 'button', { 'attr': { 'class': 'button' } } ) }}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from