• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Spinboxes and Dropdowns in Style Properties?

Jaxel

Well-known member
#3
Yep, you just need to use 'named template', and put the template name in the parameters box.

Jake
How do I use that? When I put the template in, its missing a lot of stuff... like the title, the hint, and even the edit link.
 

Jake B.

Well-known member
#4
How do I use that? When I put the template in, its missing a lot of stuff... like the title, the hint, and even the edit link.
You'll need to use something like this in the template:

Code:
<input type="hidden" name="checkboxes[]" value="{$property.property_definition_id}" />
<xen:selectunit name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}" label="{$property.title}">   
    <xen:option value="1" label="{xen:phrase option_one}" />
    <xen:option value="2" label="{xen:phrase option_two}" />
    <xen:option value="3" label="{xen:phrase option_three}" />
    <xen:explain>{$property.description}</xen:explain>
    <xen:html><xen:include template="style_property_unit_extra"><xen:set var="$reset">{xen:phrase reset}</xen:set></xen:include></xen:html>
</xen:selectunit>
 

Jake B.

Well-known member
#8
<input type="hidden" name="checkboxes[]" value="{$property.property_definition_id}" />
<xen:spinboxunit name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}" label="{$property.title}" min="0" max="100" step="4" />
 

Jaxel

Well-known member
#9
Yeah, I realise thats how you do it in templates... I was hoping to be able to do it in the style variables instead though, so I only have to make 1 template for my spinboxes, instead of having to make six... when I only need to change one variable.