Section Name

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 3, 2012   (RSS)

I would like to print the "Section Name" in the area where the generated code is. It looks like it might be $menuName but that doesn't work. Any help?

Re: [RonPeterson] Section Name

By Jason - January 3, 2012 - edited: January 3, 2012

Hi,

Since a section name doesn't change very often, and a page will generally only show one section at a time, you can normally just hard code this value
ie
<h1>Listings</h1>

If you need to dynamically retrieve the section name, you can do it like this:

<?php $sectionDetails = loadSchema($record['_tableName']); ?>
<h1><?php echo $sectionDetails['menuName'];?></h1>


Note: You may need to change the name of the variable $record to match the variable names you are using on your page.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Section Name

Thanks! That worked.

minor syntax problem: needs ' just before _tableName