Share » Forums » Developer » Using atributes of users class

Using atributes of users class

Using atributes of users class

Friday 03 November 2006 4:24:27 am - 4 replies

Author Message

Claudia Kosny

Tuesday 07 November 2006 11:17:04 am

Hi Pavel

Javascript would certainly be an option although it is inherently unsafe. The nice thing about javascript is that your user does not need to reload the page.
If you want to do it in the template you can create an override for the \design\standard\templates\content\datatype\edit\ezselection.tpl template. Just get the selected option from the attribute content and disable the other options as required.

Claudia

Pavel Konovalov

Tuesday 07 November 2006 11:33:51 am

Hi Claudia
>Just get the selected option from the attribute content and disable the
other options as required.

But how I can do that?

Are you gangsters?!
No, we are Russians.

Claudia Kosny

Tuesday 07 November 2006 11:46:11 am

Hi

Have a look at the template I mentioned before. There you have

...
{let selected_id_array=$attribute.content}
...
<option value="{$Options.item.id}" {section show=$selected_id_array|contains( $Options.item.id )}selected="selected"{/section}>{$Options.item.name|wash( xhtml )}</option>
...

This shows that $selected_id_array is an array that contains the selected option(s).

Claudia

Pavel Konovalov

Tuesday 07 November 2006 11:58:43 am

Tthank you, Claduia!
Maybe, I solve my trouble.

Are you gangsters?!
No, we are Russians.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu