Categorized Entries without Detail Pages
I'm pretty sure I know what your answer is going to be, but I'll ask anyway:
I have a group of entries ordered by categories, however each entry does not have its own page. The entry content is displayed on a dynamically populated listing page only, like so:
{exp:channel:entries channel="resources" dynamic="no" disable="category_fields|member_data|pagination" {triggers:entries}}
{if count == 1}
<dl>
{/if}
<dt><a href="{resources_link}">{title}</a></dt>
<dd>
{resources_description}
<p><a href="{resources_link}">Learn More</a></p>
</dd>
{if count == total_results}
</dl>
{/if}
{/exp:channel:entries}
So the question is whether or not a user can search the content of the resources fields, but be sent to the category listing page from the search results.
Replies
kgrote 20 Jun 2012 19:40
As a follow-up, I've figured I might be able to modify the results template to link to the category page, but from what I can tell I can't use category variables inside the low_search:results loop...
Low 21 Jun 2012 07:48
Hi Kristen,
You should be able to use category variables inside the low_search:results loop. If you're having trouble displaying those, please let me know.
kgrote 1 Aug 2012 15:53
Hi Low,
I finally got around to messing with this and my category variables aren't working. Here's my template code:
With the {categories} tag pair, nothing is output. Without it, {category_url_title} is output as text.
Low 1 Aug 2012 16:08
How about removing "categories" from the disable parameter?
kgrote 1 Aug 2012 22:04
o_o
kgrote 8 Aug 2012 22:10
I'm back!
So, using the template code above (minus the category disabler, of course), what happens now is almost right - except for every search term, the resources results always display first, regardless of relevance (that was a lot of 'R's).
Is there a way around this?
Low 8 Aug 2012 22:21
Quick reply before I hit the sack (it's passed midnight here. Next reply in 8 hours. ;)
Is this the order of the search results? Are they not ordered by relevance?
kgrote 8 Aug 2012 22:37
Ah, ok. They are ordering by relevance, it just seemed like they weren't because the resources entries were always showing up at the top.
Further testing shows that all is well.
I think I finally have this figured out so I can stop bugging you! Hooray!