How use ini file to store some project specific information?

Author Message

Eason Huang

Wednesday 11 March 2009 3:07:13 am

How do we make use of the ini file to store some project specific information, such as node ids?

Thanks advance!

skype:hyslx27

[email protected]

Jean-Yves Zinsou

Wednesday 11 March 2009 8:04:23 am

Hi,
you must create a ini file in the settings folder of you extensions .
With sections :
For exemple a file called ezorder.ini

[EZorderGlobalSettings]
# root node for editions 
EditionsRootNode=175

And then call it with:

 ezini( 'EZorderGlobalSettings','EditionsRootNode', 'ezorder.ini')

in template code or

	$ezorderINI = eZINI::instance( 'ezorder.ini' ); 
	
		$editions_root_node_ID= $ezorderINI->variable( 'EZorderGlobalSettings','EditionsRootNode' );

in php

Hope this helps !

Jey

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

Eason Huang

Wednesday 11 March 2009 7:49:20 pm

Many thanks, Jey!

skype:hyslx27

[email protected]

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