Question About Single Article Page

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 4, 2010   (RSS)

Re: [hhusted] Question About Single Article Page

By gkornbluth - May 4, 2010 - edited: May 4, 2010

Hi again hhusted.

Sorry you're getting an error.

One key is that this type of information is usually best called from a single record editor. The good news is that you can simultaneously use information from any combination of editors to populate your web pages.

Here's an excerpt from my CMSB Cookbook http://www.thecmsbcookbook.com that addresses that issue.

CHANGING METATAG OR OTHER DATA FROM CMSB
The first step is to create the fields required for the information. So say your sigle record section editor is called "Pages". You would go into: Admin > Section Editors > Pages and add a new textfield called "Page Title", one called “Meta Keywords” and a third called “Meta Description”, and save the result.

Now go to your section editor and enter the values that you’d like to appear in these fields. (Remember to follow the syntax conventions required for the particular field, like commas between certain entries)

The code from your code generator will look something like this:

<?PHP echo $pagesRecord['page_title']; ?>
<?PHP echo $pagesRecord['meta_keywords']; ?> and
<?PHP echo $pagesRecord['meta_description']; ?>


In your web page, you would display your field information like this:


<title><?PHP echo $pagesRecord['page_title']; ?> </title>
<META NAME="KeyWords" CONTENT="<?PHP echo $pagesRecord['meta_keywords']; ?>">
<META NAME="Description" CONTENT="<?PHP echo $pagesRecord['meta_description']; ?>">


You can use this approach to populate any html information.

Hope that helps get you back on course.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php