Forums / Developer / passing variable to content template

"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 content template

Author Message

Dries Samyn

Thursday 10 June 2004 4:41:47 am

Hi,

I've got the following problem:
The site I'm building has a particular section that has slightly different apparearance. I can easily use the same template, if only I could identify the section. This works fine in the pagelayout template. I have something like this:

{let land_man = ""}
	{switch match=$module_result.section_id}
		{case match=10}
			{set myvar = "_b"}
		{/case}
	{/switch}
{/let}

and use the $myvar variable to change a couple of images.

That works fine. But I also need that information the the "content" template (where {$module_result.content} goes).

In that view template, $module_result is not available. So my question is. Is there a way of passing a variable to that template to use?

Thanks,

dries.

Paul Forsyth

Thursday 10 June 2004 4:59:18 am

If you are using this within an override template the $node should be available. Try:

{$node|attribute(show)}

which will show the variable name for the section id you need.

paul

--
http://www.visionwt.com