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.