How to show "hidden" records

4 posts by 2 authors in: Forums > CMS Builder
Last Post: June 26, 2015   (RSS)

By gversion - June 24, 2015

Hello,

I would like to use the in-built function "hidden" to hide listings at the front-end of my website however I would like to be able to show these "hidden" listings in the user control panel. When a user decides to set their listing live they can untick "hidden" and then the listing will be displayed. The problem currently is that I can't show the listing to the user in their control panel because it's hidden!

Is there a way I can show "hidden" listings in the user control panel but keep them hidden at the front-end?

It seems that if I try displaying listings `WHERE hidden = 1` (as shown below) then it still does not display hidden records.

list($listingsRecords, $listingsMetaData) = getRecords(array(
'tableName' => 'listings',
'limit' => '5',
'loadUploads' => true,
'allowSearch' => false,
'where' => "hidden = 1",
));

If this is simply not possible then any simple suggestions for a workaround would be greatly appreciated.

Thank you,

Greg

By Damon - June 25, 2015

Hi Greg,

Can you try adding this to show hidden records:

 'ignoreHidden'            => true,


Let me know if this does it.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gversion - June 25, 2015

Hi Damon

Thank you for your suggestion, which has worked great!

Did I miss this in the documentation?

Thanks,

Greg