Forums / Setup & design / Use of set-block

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

Use of set-block

Author Message

Adolfo Barragán

Wednesday 30 August 2006 5:20:49 am

I need to put code generated by some of override templates inmediately before the closing </body> tag.

Can I use this schema?

1. pagelayout.tpl

<html>
<head>...</head>
<body>
  ...
  {def $myCode=""}
  <div id="maincontent">{$module_result.content}</div>
  ...
  {$myCode}
</body>
</html>

2. override.tpl

...
<div id="map"></div>
...
{set-block variable=$myCode scope=global}
  ...
  ... some mixing javascript and template code
  ...
{/set-block}

$myCode variable is available on both templates?

Regards
Adolfo Barragán