Forum
Question about search functionality
Hi,
I have a subdirectory within a site for support articles, the pages are generated through simple "list & detail" mode. I'm setting up a support search that should only pull in the pages from that support directory, and not other general pages, blog, etc…
I'm getting the odd blog post showing up in the support search, and I'm wondering if this might be because the blog (post) template and support (article) template I've created use the same ID's e.g. -
Blog post title id:
<perch:blog id="postTitle" type="text" label="Title" required="true" title="true" order="1" />
Support article title id:
<perch:content id="postTitle" type="text" label="Title" required="true" title="true" order="1" />
If you don't think this should be an issue, let me know and I can post diagnostics and code.
Thanks
Are you limiting the search just to the Content app?
Hi Drew,
I'm using -
But still getting blog posts through, here the debug from the page
That's supposed to be an array. Try:
That's got it, cheers Drew. I'd assumed the array was only required when using multiple apps.
Are these app values documented anywhere? I had also assumed they would use the same values as the configuration for "app_list".
e.g. had I wanted content, blog and events to be included in the search, I would have assumed:
Just wanted to check for future reference, Thanks!
Both those are given as examples in the docs - it would be
PerchBlog
andPerchEvents
. It's the names of the search handlers rather than the folders on the file system.My apologies, those are exactly the examples used. I hadn't picked up on that when scanning the docs, but your explanation has helped me better understand what I'm actually doing with search now, so thanks!