Coding not displaying correctly

6 posts by 3 authors in: Forums > CMS Builder
Last Post: May 14, 2010   (RSS)

Re: [apdance9] Coding not displaying correctly

By zip222 - May 12, 2010

I think you need to disable search since you have multiple viewers on a single page. This is done by adding the following:

list($main_menuRecords, $main_menuMetaData) = getRecords(array(
'tableName' => 'main_menu',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
'allowSearch' => '0',
));


trying adding that to all of your list viewers.

Re: [zip222] Coding not displaying correctly

By design9 - May 12, 2010

Thanks...I tried that but it doesn't work or fix the issue.

April

Re: [apdance9] Coding not displaying correctly

By Jason - May 14, 2010

Hi April,

You're taking the menu information from 2 different tables (main_menu and secondary_menu). These tables only have 1 record each, so there is no need for the "where" clause. Try changing your getRecords statements to these:

list($main_menuRecords, $main_menuMetaData) = getRecords(array(
'tableName' => 'main_menu',
'limit' => '1',
'allowSearch' => false,
));
$main_menuRecord = @$main_menuRecords[0]; // get first record

list($secondary_menuRecords, $secondary_menuMetaData) = getRecords(array(
'tableName' => 'secondary_menu',
'limit' => '1',
'allowSearch' => false,
));
$secondary_menuRecord = @$secondary_menuRecords[0]; // get first record


Another thing you may want to take a look at is this code:
list($article_archivesRecords, $article_archivesMetaData) = getRecords(array(
'tableName' => 'article_archives',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$article_archivesRecord = @$article_archivesRecords[0]; // get first record


You have this exact same code twice, once starting at line 26 and again starting at line 57. You may want to remove one.

Give this a try and let me know if you run into any more problems.
---------------------------------------------------
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] Coding not displaying correctly

By design9 - May 14, 2010

Thank you Jason...

I feel really stupid that I had the coding in their twice. Working too fast. Anyway, that did the trick and it is working perfectly now!

BTW, is it best to go ahead and change that coding in the menus on all of the pages that use those viewers?

Thanks!

April

Re: [apdance9] Coding not displaying correctly

By Jason - May 14, 2010

Hi April,

I'm glad that's working out for you now.

If there are other pages that are using those menus, you would probably want to make those same changes so that you don't run into that issue again in the future.

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/