Spinboxes and Dropdowns in Style Properties?

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.
 
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>
 
Okay, that works for dropdown menus... but for spinboxes, how would I set and get min/max/step?
 
<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" />
 
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.
 
Top Bottom