i need help plz,,,how can i do this ?!

Author Message

Selmah Maxim

Wednesday 14 May 2003 2:18:40 am

hi ..

really i need help, i gived up :(

in the folder class i had added radiobutton, called 'user_access' , if is active user cann`t not enter this folder.

now, in the browse module, i need to check the first folder, coz it`s come all the radiobuttons come unchecked, so how can i do this ?

my 1st code i worte to check if this the 1st folder, if yes the make it the selected one :

{section show=eq($Object:index,0)}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" checked/>

{section-else}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" />
{/section}

it`s work fine, but how can hide the radio button if user_acces is 0 ?

i had tried almost every thing, but no result :(

any help please ?

Vivienne van Velzen

Wednesday 14 May 2003 2:35:21 am

Maybe this'll work (haven't tested it, though...):

{* section that loops through folders on browse page *}

name folder -
{section show=eq($:item.contentobject_version_object.data_map.user_access.content, 0)}
<input type="radio" ...>
{/section}

{* /section loop *}

Selmah Maxim

Wednesday 14 May 2003 3:04:13 am

it`s work, i had tried befor, but in this case i cann`t make radio button checked !

what i need : checked the radio button, but just 1 radiobutton, and just if user_access is true.

the result is : 3 status, 1. just 1 radiobutton is checked from the user_access group. 2. else radiobutton in user_access is unchecked. 3. what is not in user_access no radiobutton, just n/a.

i got this code work fine, but am still not sure about it, i got what am need but i think there are better way to do it , coz by thinking this will check up the just the 1st radiobutton if is user_access, but my 1st radionbutton user_access is false, coz of this is strange for me it`s work ?!

{section show=eq($Object:index,0) and show=eq($Object:item.data_map.user_access.content,1) }

<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" checked/>
{section-else}
{section show=eq($Object:item.data_map.user_access.content,1)}
<input type="radio" name="SelectedNodeIDArray[]" value="{$Object:item.node_id}" />
{section-else}
n/a
{/section}
{/section}

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.