ezini problem

Author Message

Pål Messenlien

Monday 27 November 2006 1:34:21 am

Im working on a portal extension here and im stuck at some problems with the left menu.

The thing im trying to get is a value from a ini file into the left menu template.

This is my treemenu.ini.appende.php

[TreeMenu]

# which classes to show
ShowClasses[]
ShowClasses[]=folder
ShowClasses[]=forum
ShowClasses[]=gallery
ShowClasses[]=user_group
#ShowClasses[]=foo_folder
ShowClasses[]=lenke
ShowClasses[]=iframe
ShowClasses[]=nettside
ShowClasses[]=dokumentlager
ShowClasses[]=skilleblokk
ShowClasses[]=person_list
ShowClasses[]=lenke_list

[RootStart]
StartRoot[]=1

In the left menu i use this code to get values and use them

{def 	$classFilter = ezini( 'TreeMenu', 'ShowClasses' , 'treemenu.ini' )
	$menuRoot = ezini( 'RootStart', 'StartRoot' , 'treemenu.ini' )
}

{def $docs=treemenu2( $module_result.path, $module_result.node_id,
                                     $classFilter, $menuRoot,3)}

I have also tried to use an if to check and set the value

{def $RootMenu = 0}
{if $menuRoot|eq( '1' )}
	{set $RootMenu = 1}
{/if}
{def $docs=treemenu2( $module_result.path, $module_result.node_id,
                                     $classFilter, $RootMenu,3)}

I have tried lots of other things also without any luck. From earlier i have also had problems checking ini values to set functions in templates.

Any suggestions?

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

Pål Messenlien

Monday 27 November 2006 4:02:05 am

Solved!!!

[RootStart]
StartRoot=1

thanks Ronny!!

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------

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 18 2025 18:40:13
Script start
Timing: Jan 18 2025 18:40:13
Module start 'layout'
Timing: Jan 18 2025 18:40:13
Module start 'content'
Timing: Jan 18 2025 18:40:14
Module end 'content'
Timing: Jan 18 2025 18:40:14
Script end

Main resources:

Total runtime1.1428 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.9219152.6094
Module start 'layout' 0.00700.0038 741.531339.3984
Module start 'content' 0.01081.1303 780.9297456.5703
Module end 'content' 1.14110.0016 1,237.50008.2031
Script end 1.1428  1,245.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.3921160.0003
Check MTime0.00140.1251160.0001
Mysql Total
Database connection0.00080.072810.0008
Mysqli_queries1.095195.8226520.0211
Looping result0.00050.0465500.0000
Template Total1.106496.820.5532
Template load0.00190.170320.0010
Template processing1.104596.646720.5522
Template load and register function0.00020.020110.0002
states
state_id_array0.00090.076010.0009
state_identifier_array0.00100.089320.0005
Override
Cache load0.00160.1383170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.058110.0007
Fetch class attribute name0.00120.101220.0006
XML
Image XML parsing0.00020.013610.0002
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00070.0604100.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs