Hi,
Is there a way to have a count (not the native {count}) to count your way through an if loop?
ie. in the below, I want to show a heading of “Today” IF there are people on leave, AND only the first time it loops through the code.
I can’t use the native {count} variable, as it could get 5 entries, but only show 2 that fall within the range defined in the if statement.
Code ref:
{exp:weblog:entries weblog="staff_leave" orderby="staff_leave_start" sort="asc" disable="categories|category_fields|member_data|pagination|trackbacks"}
{if ({current_time format="%U"} >= staff_leave_start) AND ({current_time format="%U"} <= staff_leave_end)}
<strong>Today: {title}</strong>
{/if}
{/exp:weblog:entries}Regards,
Christiaan