CHANGING METATAG OR OTHER DATA FROM WITHIN CMSB - Aug 2nd, 2010


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.

The first step is to create the fields required for the information. So say your single 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 and the detail.
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)

You'll have tags in your viewer page that look 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 (almost) any html tag information. (I’m sure that there’s one that won’t
work somewhere.)



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service