Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Section Name

 

 


RonPeterson
New User

Jan 2, 2012, 8:17 PM

Post #1 of 4 (438 views)
Shortcut
Section Name Can't Post

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?


Jason
Staff / Moderator


Jan 3, 2012, 8:20 AM

Post #2 of 4 (429 views)
Shortcut
Re: [RonPeterson] Section Name [In reply to] Can't Post

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

Code
<h1>Listings</h1>


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


Code
<?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 - Programmer 
interactivetools.com

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

(This post was edited by Jason on Jan 3, 2012, 8:48 AM)


RonPeterson
New User

Jan 3, 2012, 8:39 AM

Post #3 of 4 (426 views)
Shortcut
Re: [Jason] Section Name [In reply to] Can't Post

Thanks! That worked.

minor syntax problem: needs ' just before _tableName


Jason
Staff / Moderator


Jan 3, 2012, 8:49 AM

Post #4 of 4 (419 views)
Shortcut
Re: [RonPeterson] Section Name [In reply to] Can't Post

Good catch. I fixed the code in the previous post.

Thanks
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

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