Forums / General / Passing variable to a template thru override.ini

"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".

Passing variable to a template thru override.ini

Author Message

Quoc Huy Nguyen Dinh

Thursday 04 September 2008 6:08:25 am

Hi all,

I have 2 different pages that are similar, they just differ from the nodeID of the subtree that is used by the template file.

So in the extension settings, I have override.ini.append.php with
[page1]
Source=node/view/full.tpl
MatchFile=full/mytemplate.tpl
Subdir=templates
Match[node]=210

and I would like to do the same for page2
[page2]
Source=node/view/full.tpl
MatchFile=full/mytemplate.tpl
Subdir=templates
Match[node]=216

But how can I tell mytemplate.tpl to use subtree nodeID = X if page1 and nodeID = Y if page2 ?

is there something like:
[page1]
Source=node/view/full.tpl
MatchFile=full/mytemplate.tpl
Subdir=templates
Match[node]=210
UseNodeID=158 ******

then in mytemplate.tpl I can fetch the ini variable UseNodeID ?
Thanks