Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi!

I think I happened on a little bug (or maybe I missed something on the way it should be used ;) )...

So, I wanted to hide certain contents of editable regions from being displayed in "<cms:show k_search_excerpt />" (since some contents of fields are getting displayed I'd rather not have public). A search in the forum brought me to the solution of using "searchable='0' " within the definition of the editable region. That worked fine.

However one of those regions contained for example a "ticket-number" with which an unregistered user can access an inquiry he made and see the corresponding answers to it. To handle the different views in this case I used custom routes, and the non searchable ticket as part of the URL/way to access it:
Code: Select all
<cms:else_if k_matched_route='verify_view'/>
<cms:pages custom_field="ate_inquiry_ticket=<cms:show rt_ticket_id/>">
<cms:embed 'submit_verify.html' />
<cms:no_results>
<cms:embed 'page_not_found.html' />
</cms:no_results>
</cms:pages>

The view is matched, but the ticket is actually not found. It seems not to be able to access it's contents. (earlier entries, where the change to not being searchable was not updated, worked fine)

---

My current solution is to remove "searchable='0' " and to specify exactly what the search should put out - this however prevents me from using "<cms:show k_search_excerpt />". Is it actually possible to use search_excerpt (and therefore be able to highlight the search phrase) only on specific editable regions (like only on "my_content")?

--

And if I already have the attention might I be so frank and point to my little question here https://www.couchcms.com/forum/viewtopic.php?f=2&t=7134&p=29194#p29194 - I guess the solution there should be rather easy if one just knows things a bit more thoroughly ;).

Hi,

I checked and the way the code is structured at the moment, setting a field as non searchable will indeed prevent 'custom_field' from finding anything as it uses the same data as that displayed in search results.

Prima fascie, this perhaps is not correct as the data should only be prevented from appearing in search results.
I'll have to think over this some more, though, before making any changes to the code.

Would also like to hear other member's opinion on this.

Interesting point. I have noticed it as well long ago.
Searchable is #1, usable in filters (custom_field) is #2 and maybe even accessible could be #3 (editables that are defined to appear only in admin panel and never exposed/fetched to front-end).
3 posts Page 1 of 1

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests