Setting up a site that has three levels that consist of the following types of pages:
Section page (/about/)
Listing page (/about/blog)
Detail page (/about/blog/blog-item-title)
The Section and Listing pages work fine but the detail page wants to list all blog_items not just the one it should show, I’ve tried “dynamic=“yes” and this doesn’t work either.
Here’s my code, shortened some unimportant parts (like comments form etc):
{exp:switchee variable="{segment_2}" parse="inward"}
{case value="#^P(\\\\d+)$#|''|category"}
{embed="site/header" page_name="section"}
{exp:channel:entries channel="{segment_1}" limit="1"}
<h1>{title}</h1>
{/exp:channel:entries}
{/case}
{case value="blog"}
{if segment_3 == ""} <!-- Blog listing page -->
{embed="site/header" page_name="listing"}
<h1>Blog</h1>
{exp:channel:entries channel="blog_item" limit="10" paginate="bottom"}
<a href="http://{url_title_path=community/blog}">_ <article>_ <h1>{title}</h1>_ {image:main wrap="image"}_ {introduction}_ <div class="body">_ {body}_ </div>_ </article>_ </a>
{paginate}{/paginate}
{/exp:channel:entries}
{if:else} <!-- Blog detail page -->
{embed="site/header" page_name="detail"}
{exp:channel:entries channel="blog_item" dynamic="yes"}
<article>
<h1>{title}</h1>
{image:main wrap="image"}
{introduction}
<div class="body">
{body}
</div>
</article>
{/exp:channel:entries}
{exp:comment:form channel="blog_item" preview="channel/preview"}
{/exp:comment:form}
{exp:comment:entries sort="asc" limit="20"}
{/exp:comment:entries}
{/if}
{/case}
{/exp:switchee}
{embed="site/footer"}