more than one list view record

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 29, 2008   (RSS)

By Chris_t - February 29, 2008 - edited: February 29, 2008

Hello all,

I finaly got my menus sorted out and found a new problem.

I need to have 2 lists vies stated on one page and when I try that they conflict with each other. is there a way to put 2 in the array field I can't find much on this field

havi[font "Courier New"]ing 2

<?php

require_once "/www/htdocs/cmsAdmin/lib/viewer_functions.php";
$options = array();
$options['tableName'] = 'article';
$options['titleField'] = 'title';
$options['viewerUrl'] = 'articlePage.php';
$options['perPage'] = '';
$options['orderBy'] = 'featured DESC, date DESC, title';
$options['pageNum'] = '';
$options['where'] = '';
$options['useSeoUrls'] = '';

list($listRows, $listDetails) = getListRows($options);

?>



is the problem I need one for categoy menu and one for the list menu



thanks

Edit: Added line breaks to code.

Re: [ChrisTitchenal] more than one list view record

By Dave - February 29, 2008

There's things you can do. If the variables conflict with each other you can just rename them. So instead of $listRows and $listDetails you could call those $couponRows and $couponDetails for one of the list viewers.

If the settings conflict, meaning one list viewer is trying to show page 2 because there's a 2 in the url, etc, you can just hard code the options.

Setting $options['pageNum'] to 1 will ignore the page number in the url. And setting $options['where'] to 1 will ignore any keyword searches in the url.

Hope that helps, let me know if you need more details.
Dave Edis - Senior Developer
interactivetools.com