Lack of interest Add ability for dropdowns in style properties

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Russ

Well-known member
I'd love the ability to add drop downs in the style properties, could add some really nifty things to them and organize my properties quite a bit too.

Not really much else to say... I hope it's considered (y)

UPDATE: So via admin templates it's possible but considering I want to use dropdown via style properties in styles I release to the public, it's not. Suggesiton either let you export admin templates with a style, or simply get the example provided below to work on normal styles.
 
Last edited:
Upvote 5
This suggestion has been closed. Votes are no longer accepted.
Pretty sure it's possible with a named template. I'll do an example for you when not on my phone.

The trick is probably getting the name attribute of the select box right so it saves the data correctly.
 
Yeah this is already possible using a named template:

upload_2014-3-24_21-58-19.webp


upload_2014-3-24_21-59-3.webp


Example template:

Rich (BB 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:hint>Pick a colour</xen:hint>
    <xen:option value="" label="" />
    <xen:option value="red" label="Red" />
    <xen:option value="blue" label="Blue" />
    <xen:option value="pink" label="Pink" />
    <xen:option value="green" label="Green" />
    <xen:option value="yellow" label="Yellow" />
    <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>
The bits in red, you probably should include in each new template you create. Also, only one style property per template. It's unlikely you'd get multi select lists or checkboxes working because they would require the value to be stored as an array but they're stored as a scalar value instead.

And the definition is set up like this:

upload_2014-3-24_22-4-30.webp

style_property_russ is the template name.
 
Sorry to bug @Chris D

But I'm a little confused or am missing the obvious.

When attempting to do this, I'm getting an error every time I try creating a template.

I copied directly from your code, and assumed all the "property_definition_id" and other property_ect were simply placeholders to pull text from the style property itself.

When creating though I'm getting this:

ignorance.webp
 
You need to create it as an admin template...

And therein lies the problem I've just realised... You can't export Admin Templates with a style, can you?
 
Not really, because what you suggested is already possible.

The suggestion would have to be the ability to export admin templates with a style.
 
Not really, because what you suggested is already possible.

The suggestion would have to be the ability to export admin templates with a style.

Or... the ability to do the exact process without touching admin templates would be the suggestion? Either way I hope they address the ability to do either your method(export admin templates with a style) or even better... make the process work without admin templates.
 
Back
Top Bottom