Forums / Developer / Customizing an attribute's view

Customizing an attribute's view

Author Message

H-Works Agency

Wednesday 09 March 2011 3:50:16 am

Hello,

How can i modify - with php customs methods - the way an attribute is viewed ?

In concrete terms i have to modify the way ezprice amount is displayed depending on some custom predefined rules.

I've checked ini files and have seen in datatype.ini a [ViewSettings] with GroupedInput[] variable : Is there a way to use this to intercalate some clean php code between kernel ezprice.php and the {$attribute.value} ?

Thanx in advance !

EZP is Great

Sebastiaan van der Vliet

Wednesday 09 March 2011 4:08:04 am

Hi,

Do you mean you want to change/clean the price that is actually displayed? Like {$attribute.value|do_something_before_outputting}?

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Fou Jino

Wednesday 09 March 2011 5:37:29 am

You can for example add a custom template operator which take in parameters the price and return a string with the price modifier like you want

Foujino ~ http://www.foujino-blog.be

H-Works Agency

Wednesday 09 March 2011 6:32:28 am

Uhm yes of course i can do that...thanx for the help

EZP is Great