Re: Attribute-Select

Christian Adolphi | meditix GmbH <[email protected]> Fri, 12 Mar 2010 11:24:59 +0100
Newsgroups gmane.comp.cms.zms.devel
Organization meditix GmbH
Message-ID <[email protected]>
Thanks, Thorsten,

yes, it helps!

The trick is to *return* the options as *arrays*. That's all. (I tried 
it by *inserting* the *vars* line per line ...)

Thank you very much.

Christian Adolphi



Am 12.03.10 10:49, schrieb Thorsten Weber:
> Hi Christian
>
> I did something similar like this:
>
> 1.) in dictionary there are numerous entries like:
>
> getLangStr('RT_1',lang)
> getLangStr('RT_2',lang)
> etc...
>
> 2.) then I filled the select input (meta_id: RT_value) of custom obj from dictionary
>
> <dtml-call "REQUEST.set('RT',[])">
> <dtml-let lang_dict="getLangDict()">
> 	<dtml-in lang_dict>
> 		<dtml-comment><!-- RECIPE TIME --></dtml-comment>
> 		<dtml-if "_['sequence-item']['key'].find('RT_')>  -1">
> 			<dtml-call "REQUEST['RT'].append([getLangStr(_['sequence-item']['key'],lang),getLangStr(_['sequence-item']['key'],lang)])">
> 		</dtml-if>
> 	</dtml-in>
> </dtml-let>
> <dtml-return "REQUEST['RT']">
>
> 3.) for output in dtml like always:
>
> <dtml-if "getObjProperty('RT_value',REQUEST)">
> 	<p><dtml-var "getObjProperty('RT_value',REQUEST)"></p>
> </dtml-if>
>
> hope this helps.
> Thorsten