Updating CMS Builder Code

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 25, 2008   (RSS)

By Perchpole - June 25, 2008

Hi, Dave -

I'm now working on my 4th CMS builder site. Unfortunately, I'm so happy with the way the system is playing that I've gone back to my second site and started to convert it (to take advantage of the new features found in v1.17). I'm afraid this was easier said than done! By updating all of the templates I have inadvertently broken some of the PHP code snippets I had put to good effect. For example, when I wanted to print the name of the SQL table on my page you suggested I should use...

<?php $schema = loadSchema($options['tableName']); print $schema['menuName']; ?>




This no-longer works!

In fact, after much trial and error, it now seems impossible to print any $record outside of the boundaries of the <?php foreach...> code block.

If I have a field called "category", for example, I would expect to be able to print this record anywhere on my page by inserting...

<?php echo $record['category'] ?>

or

<?php echo $tablenameRecord['category'] ?>


It doesn't seem to be that simple any more. The latest version of CMSB is much better than previous incarnations but also seems far stricter.

Any pointers?


[unsure]

Perch