Hi - I’m noticing some really buggy behavior in the channel entries parameters tag. If I do the following:
{exp:channel:entries channel="projects" limit="4" {if segment_4 == "lang"}search:project_category="{segment_3}" {if:else}{if segment_3 == "popular"} orderby="view_count_one"{if:else}search:project_category="{segment_3}" {/if} {/if}dynamic="off" }
<article class="thumb_container box">
<div class="thumb_content">
{project_thumb}
<header class="thumb_header">{title}</header>
{project_excerpt}
<a href="#" class="thumb_view">View</a>
<div class="tags">
{exp:tagger:tags entry_id="{entry_id}"}
<span class="tag">{tagger:tag_name}</span>,
{/exp:tagger:tags}
</div>
</div>
</article>
{/exp:channel:entries}
the displaying of entries does not filter properly, and so instead I have to do the following, which seems pretty absurd:
{if segment_4 == "lang"}
{exp:channel:entries channel="projects" limit="4" search:project_category="{segment_3}" dynamic="off" }
<article class="thumb_container box">
<div class="thumb_content">
{project_thumb}
<header class="thumb_header">{title}</header>
{project_excerpt}
<a href="#" class="thumb_view">View</a>
<div class="tags">
{exp:tagger:tags entry_id="{entry_id}"}
<span class="tag">{tagger:tag_name}</span>,
{/exp:tagger:tags}
</div>
</div>
</article>
{/exp:channel:entries}
{if:else}
{if segment_3 != ""}
{if segment_3 == "popular"}
{exp:channel:entries channel="projects" limit="4" orderby="view_count_one" dynamic="off" }
<article class="thumb_container box">
<div class="thumb_content">
{project_thumb}
<header class="thumb_header">{title}</header>
{project_excerpt}
<a href="#" class="thumb_view">View</a>
<div class="tags">
{exp:tagger:tags entry_id="{entry_id}"}
<span class="tag">{tagger:tag_name}</span>,
{/exp:tagger:tags}
</div>
</div>
</article>
{/exp:channel:entries}
{if:else}
{exp:channel:entries channel="projects" limit="4" search:project_tags="{segment_3}" dynamic="off" }
<article class="thumb_container box">
<div class="thumb_content">
{project_thumb}
<header class="thumb_header">{title}</header>
{project_excerpt}
<a href="#" class="thumb_view">View</a>
<div class="tags">
{exp:tagger:tags entry_id="{entry_id}"}
<span class="tag">{tagger:tag_name}</span>,
{/exp:tagger:tags}
</div>
</div>
</article>
{/exp:channel:entries}
{/if}
{if:else}
{exp:channel:entries channel="projects" limit="4" dynamic="off" }
<article class="thumb_container box">
<div class="thumb_content">
{project_thumb}
<header class="thumb_header">{title}</header>
{project_excerpt}
<a href="#" class="thumb_view">View</a>
<div class="tags">
{exp:tagger:tags entry_id="{entry_id}"}
<span class="tag">{tagger:tag_name}</span>,
{/exp:tagger:tags}
</div>
</div>
</article>
{/exp:channel:entries}
{/if}
{/if}
Is there a better way to do this? Am I making an error somehow in my conditional?