Hi,
i'm struggling with smarty variable scope, although I believe it should be straightforward...
I use cmsms 1.11.4 on Ubuntu 12.04 LTS with php 5.3.10
This Page template produces a page with 456, when I expect 123456
The <head> does contain the 123 comment as expected.
{process_pagedata}<!DOCTYPE html>
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
{$test="123"}
<!-- {$test} -->
</head>
</__body>
{content assign="notused"}
{$test}456
<__body>
</__html>
Can anybody else reproduce this behaviour and maybe help me understand it?
Thank you very much.
[SOLVED] Smarty variable is empty in </__body>
[SOLVED] Smarty variable is empty in </__body>
Last edited by atz6975 on Mon Feb 04, 2013 2:36 pm, edited 2 times in total.
Re: Smarty variable is empty in </__body>
Dear atz6975,
The reason for this is the "processing order".
You can read more about it here:
http://www.i-do-this.com/blog/75/Under- ... -Templates
Try defining the var at the top of the body instead of inside the head.
Greetings,
Manuel
The reason for this is the "processing order".
You can read more about it here:
http://www.i-do-this.com/blog/75/Under- ... -Templates
Try defining the var at the top of the body instead of inside the head.
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
Re: [SOLVED] Smarty variable is empty in </__body>
YES!
Thank you very much.
Thank you very much.