ZenphotoThe simpler media website CMS
Hello,
I use the same Zenphoto cms for pictures (PC,tablets, smartphones) and VR headsets.
Using a VR headset ? you are redirected in the VR album, with all sub-albums available.
You cannot enter the VR section if you use a Pc/tablet (smartphones are OK in VR with a cheap headset)
Can I alter the search function so that the VR album + sub-albums are excluded from results ?
(no search page in VR section)
Thank you in advance !
Comments
While the searchEngine class has a property for that it for some reason cannot be set directly being protected.
Thte searchform function has only a parameter to set where to search but not to exclude.
I had to look myself: A small not so elegant workaround seesm to work by re-creating a new searchEngine object. So on your search.php try this right before all the search code:
Thank you so much, it works perfectly.
My problem is solved.
That question and your response could help some other Zenphoto users !
I probably just found the more elegant way without neeeding to overwrite the existing search object:
I was not sure if setting that would clear any other search params submitted already but seems to work for me, too.