Re: showoutput_multiselect template
Marty Vance <[email protected]>
| Newsgroups | gmane.comp.cms.xaraya.user |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
[email protected] wrote: > Tim Stalker wrote: > >> I'd like to setup the multiselect property to show related articles >> based on pubtype id. I have no problem setting it up, but each pubtype >> uses the same showoutput_multiselect.xt template. Is there a way to >> have separate templates for the multiselect for each of my pubtypes? >> I've tried showoutput_multiselect-pubtypename.xt and it won't work. >> The template is in the base/properties folder of my theme. I need 5 >> templates to use instead on the one. >> >> Thanks all >> > Why do you need 5 templates? Each multiselect to show only the articles > of a specific pubtype? > If so just create an array of articles with the same pubtype with the > structure being > > $options = array( > array('id' => [articleid], 'name' => [articlename]), > .... > ) > > and set that as an attribute in your tag > > <xar:data-output name="..." type="multiselect" options="$options" /> > > Not exactly sure how you get the array of articles in the first place. > Presumably the getall function? > > HTH > Marc Even still, the ability to set a template for each dd property (a la block instances) could be very useful. The question then becomes do we allow input for a template name extension or automagically look for [type]-[propertyname]-[property id].xd templates. IE, showhidden-related.xd or showhidden-62.xd. The label and showhidden template types are probably less immediately useful unless complex form setup/handling is being used. I'm pretty sure this would be moderately easy: add a template field to the property object (if we don't use property id) and add some code in various places (including many of the property php files... lots of gruntwork) to support these new expanded filenames.