BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
Can't display channel entries with category_construct:categories tag
#84 opened by Design Workshop
Description
Hi, I'm trying to create a list of categories and display channel enties asigned to a particular category.
{exp:category_construct:categories group_id="3"}
{if construct:level_count == 1}
<ul>
{/if}
<li>
<a href="/{construct:cat_url_path}">
{construct:cat_name}
</a>
{construct:children}
{exp:channel:entries channel="datasheets" category="{construct:cat_id}"}
<h4>{title}</h4>
{/exp:channel:entries}
</li>
{if construct:level_count == construct:level_total_results}
</ul>
{/if}
{/exp:category_construct:categories}
However the channel entries are not showin. Could you please let me know id thisis possible?
Thanks
Wayne.
Replies
- TJ Draper
Replied 1/23/2018 12:19 PM, Edited 1/24/2018 9:05 AM
By default, EE's Channel Entries tag tries to be smart. In this case, you probably want it to be not smart. Try adding
dynamic="no"
to the channel entries tag.If that still doesn't work, try also putting the Channel Entries tag in an embed and passing embed parameters so that the Channel Entries tag owns the entire template contents. Sometimes EE has trouble with nesting module tags.
As a complete aside, you may also want a limit on the Channel Entries tag or things could get pretty heave and take a lot of time to render.
- Design Workshop
Replied 1/24/2018 3:58 AM, Edited 1/24/2018 9:05 AM
Thanks,
Adding
dynamic="no"
didn't work.I had to use the embed option
{embed="knowledge-base/datasheet-embed" category_id="{construct:cat_id}"}
and the channel entries are showing.Thanks
Wayne.
- TJ Draper
Replied 1/24/2018 9:05 AM
Excellent! Let me know if you have any other questions.