Forums / Developer / Let, Set, Section Problem!

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

Let, Set, Section Problem!

Author Message

Phi Hoang

Monday 24 November 2003 1:31:31 am

This is a simple code:

{let a=1}
{section name=Index loop=5}
{set a=10}
{$a}<br>
{/section}
{/let}

========>result:
1
1
1
1
1

But:
{let a=1}
{set a=10}
{section name=Index loop=5}
{$a}<br>
{/section}
{/let}
=======>result:
10
10
10
10
10

I don't know why two above results are different?
Thanks,
Phi

Paul Forsyth

Monday 24 November 2003 1:57:58 am

Read this document:

http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/basics/namespaces_

You are using your variables in difference namespaces, where they are different.

Paul