Multi vs Single Record for new site....which to use?

5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 8, 2010   (RSS)

Re: [kblm] Multi vs Single Record for new site....which to use?

By Jason - September 8, 2010

Hi Kevin,

I think you're on the right track. Using a Multi Record section would be the best way to keep everything organized. If each of your pages are static, then you can hard code in the WHERE clause. For example, you could select records based on their title:

list($aboutRecord,$aboutMetaData) = getRecords(array(
'tableName' => 'pages',
'allowSearch' => false,
'limit' => 1,
'where' => "title = 'About Us'",
));

$about = $aboutRecord[0] //get the first record


In this example, you can replace "pages" with the name of your section. After this code has run, the variable $about will hold all the elements of the record.

Hope this helps, let me know if you have any other questions.
---------------------------------------------------
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] Multi vs Single Record for new site....which to use?

By weblm - September 8, 2010

Jason,

Thanks for the quick reply.

If we end up using Multi Records for each section......I am hesitant to tie the WHERE clause to the title....simply because the client could accidentally change the title while editing the page and cause nothing to display.

Any thoughts on a better method? Should I use record number? If so, what's the easiest way to find the record number from within the admin?

Thanks!

-Kevin
LM

Re: [kblm] Multi vs Single Record for new site....which to use?

By Jason - September 8, 2010

Hi Kevin,

The record number (num) would be a better field to use. If you go into your section editor, you can add num to your ListPage Fields. This will display the record number beside each of the records when viewing the list.

Hope this helps.
---------------------------------------------------
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] Multi vs Single Record for new site....which to use?

By weblm - September 8, 2010

Jason,

Thanks so much. Works perfectly. I think we'll use this for the majority of pages and sections on the site, since we will want nice static URLs. This also helps with organization within the Admin.

Thanks.

-Kevin
LM