Variables parsing and Multiple Content Block need help
Posted: Thu Jul 09, 2009 4:30 pm
Hi!
I have several problems with programming with my CMSMS.
I made a new template from XHTML template and I want to parse a variable into it.
Here is the chronological:
I called a PHP file that contains some variables, for example, $variable1 = "Everything is set";
$variable2 = "OKAY";
then I included the PHP file using {extfile filename='path/to/your/file.php'} (first I created a UDT that contained "include($params['filename']);" with name extfile) at the top of the page.
Then in the bottom of the page I tried to call it using {php}echo "$variable1";{/php} but it didn't work. It output nothing.
When I tried to debug, I got this:
Notice: Use of undefined constant variable1 - assumed 'variable1' inĀ xxx
How can I fix this? I already enable PHP in config.
The second question is, about multiple blocks.
I want to show a block that contains "Featured clients" in the sidebar. Then in the template I put {content block="FC}, after that I added a new content and in the FC field I put something like Client A, B, C, etc. After that I tried to look at the site, it shows nothing. It will only work if I use preview in the admin panel.
How can I make the block remain visible?
Thank you.
I have several problems with programming with my CMSMS.
I made a new template from XHTML template and I want to parse a variable into it.
Here is the chronological:
I called a PHP file that contains some variables, for example, $variable1 = "Everything is set";
$variable2 = "OKAY";
then I included the PHP file using {extfile filename='path/to/your/file.php'} (first I created a UDT that contained "include($params['filename']);" with name extfile) at the top of the page.
Then in the bottom of the page I tried to call it using {php}echo "$variable1";{/php} but it didn't work. It output nothing.
When I tried to debug, I got this:
Notice: Use of undefined constant variable1 - assumed 'variable1' inĀ xxx
How can I fix this? I already enable PHP in config.
The second question is, about multiple blocks.
I want to show a block that contains "Featured clients" in the sidebar. Then in the template I put {content block="FC}, after that I added a new content and in the FC field I put something like Client A, B, C, etc. After that I tried to look at the site, it shows nothing. It will only work if I use preview in the admin panel.
How can I make the block remain visible?
Thank you.