DT Plugin
ExpressionEngine 2, ExpressionEngine 3
Back to this add-on's main page
View Other Add-ons From Jerry Price
{exp:dt:wrap day=”-7” parse=“inward »} tag has no effect on {exp:channel:categories}
General
Spade
|
Posted: 08 May 2014 08:22 AM |
|
|
|
Here is my issue :
I want to display entries per categories.
So my code looks like this:
{exp:dt:wrap day="-7" parse="inward"} {exp:channel:categories style="linear" category_group="6" show_empty="no" show_expired="no" show_future_entries="no" disable="category_fields"} <span>{category_name}</span> {exp:channel:entries channel="news|publications|events|external_events|press_releases" limit="2" status="open" category="{category_id}" start_on="{dt_ee}"} {title} {/exp:channel:entries} {/exp:channel:categories} {/exp:dt:wrap}
The issue is that the {exp:dt:wrap day=”-7” parse=“inward »} tag has no effect on the {exp:channel:categories} tag.
So, the category name is output no matter what, because the filter day=‘-7’ isn’t taken into account.
I hope it’s clear.
Thank you for your help.
|
|
|
VIM Interactive
|
Posted: 08 May 2014 09:16 AM |
# 1
|
|
Developer
|
Categories have no dates associated with them but you can just change your code slightly and it should work
{exp:dt:wrap day="-7" parse="inward"} {exp:channel:categories style="linear" category_group="6" show_empty="no" show_expired="no" show_future_entries="no" disable="category_fields"} {exp:channel:entries channel="news|publications|events|external_events|press_releases" limit="2" status="open" category="{category_id}" start_on="{dt_ee}"} {if count == 1}<span>{category_name}</span>{/if} {title}
{/exp:channel:entries} {/exp:channel:categories} {/exp:dt:wrap}
|
|
|