Variables parsing and Multiple Content Block need help

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
MyHacks
Forum Members
Forum Members
Posts: 30
Joined: Wed Jun 17, 2009 2:45 pm

Variables parsing and Multiple Content Block need help

Post by MyHacks »

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.
Post Reply

Return to “Developers Discussion”