Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

ezsys

Summary

Returns misc values such as wwwdir, sitedir, etc.

Usage

ezsys( system_variable )

Parameters

NameTypeDescriptionRequired
system_variable string The name of the desired variable. Yes.

Returns

A string containing the requested variable.

Description

This operator gives read access to certain eZ Publish system variables. The "system_variable" parameter must be used to specify the name of the variable that should be returned. As of eZ Publish 4.6 the "ezsys()" template operator now has a new parameter available "querystring". The following names can be used:

  • indexfile - name of index file
  • indexdir - relative path and index file
  • sitedir - local path of eZ Publish installation
  • wwwdir - relative directory path of eZ Publish installation
  • hostname - hostname of eZ Publish server
  • querystring (as of 4.6)

Examples

Example 1

Example: news theme installed on server "ez.no", by user "tom" in "/home/tom/public_html/local/ez_publish"

wwwdir - {ezsys( 'wwwdir' )}<br />
sitedir - {ezsys( 'sitedir' )}<br />
indexfile - {ezsys( 'indexfile' )}<br />
indexdir - {ezsys( 'indexdir' )}<br />
magicQuotes - {ezsys( 'magicQuotes' )}<br />
hostname - {ezsys( 'hostname' )}<br />
querystring - {ezsys('querystring')}<br/>
 

The following output will be produced:

wwwdir - /~tom/local/ez_publish
 sitedir - /home/tom/public_html/local/ez_publish/
 indexfile - /index.php/news
 indexdir - /~tom/local/ez_publish/index.php/news
 magicQuotes -
 hostname - ez.no
querystring - ?param1=value1&param2=value2

Balazs Halasy (05/02/2004 10:33 am)

Geir Arne Waaler (07/10/2011 10:59 am)

Geir Arne Waaler, Balazs Halasy


Comments

There are no comments.