Forums / Developer / How use ini file to store some project specific information?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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

hyslx27@gmail.com

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

hyslx27@gmail.com