How to ignore query string in viewer

2 posts by 1 authors in: Forums > CMS Builder
Last Post: May 28, 2009   (RSS)

By pothompson - May 28, 2009

I'm trying to use the following code in a viewer page called products.php

list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
'where' => $where,
));

The variable $where is being set by me based on other criteria and all works fine. However, if I reach this page using the following products.php?size=A4, then I can't seem to make it ignore the query string in the URL. I need this query string for another lookup of the product table, but for the instance outlined above, I only want it to take note of my $where varaible.

Is this possible?

Thanks.

Re: [pothompson] How to ignore query string in viewer

By pothompson - May 28, 2009

Sorry! Just answering my own question. I looked around and found that it's possible to add the 'allowSearch' parameter to the viewer code which is set to true by default.

So the following doesn't use any information in the query string:

[font "Verdana"]list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
'where' => $where,
'allowSearch' => false,
[font "Verdana"]
));


[font "Verdana"]