XF 2.2 Overwriting a property value

Mbx

Member
Just a short question.

Is it possible to override a property value (like from the style) with a normal variable inside the templates ?

The idea is is to add a preference option for a property value of the style. Otherwise one would have to completely rewrite the code (and therefore overwriting the variable seems to be the easier way).

Thanks.
 
It may help if you add some specific details.

Which property value and what are you trying to change it to?

This guide sounds like something you are trying to do:

 
I still don't really understand exactly what you're trying to achieve but perhaps you can use: <xf:set var="$var" value="value" />
 
I still don't really understand exactly what you're trying to achieve but perhaps you can use: <xf:set var="$var" value="value" />


There are vars in the templates like

{{ property('xyz') }}

These belong the style properties and may include a value as setting.

I want to overwrite this value over a user preference option, instead that only an admin can set the style property value / setting.

Like over {$xf.visitor.Profile.custom_fields.Test} => which would have the value "tooltip", instead of the {{ property('xyy') }} with "bar" as default.

For <xf:set var="$var" value="value" /> -- not sure if that would work or how excatly.

Like <xf:set var="$xyz" value="tooltip" /> or <xf:set var="property('xyz')" value="tooltip" /> or ...
 
Top Bottom