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.

eZ debug

Timing: Jan 30 2025 21:27:35
Script start
Timing: Jan 30 2025 21:27:35
Module start 'layout'
Timing: Jan 30 2025 21:27:35
Module start 'content'
Timing: Jan 30 2025 21:27:35
Module end 'content'
Timing: Jan 30 2025 21:27:35
Script end

Main resources:

Total runtime0.0214 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1563151.2109
Module start 'layout' 0.00480.0033 739.3672220.6875
Module start 'content' 0.00800.0120 960.0547997.6953
Module end 'content' 0.02000.0013 1,957.750033.9922
Script end 0.0213  1,991.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002511.5189140.0002
Check MTime0.00104.5531140.0001
Mysql Total
Database connection0.00083.832610.0008
Mysqli_queries0.00198.734830.0006
Looping result0.00000.051310.0000
Template Total0.00104.510.0010
Template load0.00073.255910.0007
Template processing0.00031.258210.0003
Override
Cache load0.00052.321210.0005
General
dbfile0.00031.181280.0000
String conversion0.00000.023440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs