I want to make a master archive index that displays subcategory hierarchy correctly. Example:
CODE
<h2>Category 1</h2>
Entry 1 title
Entry 2 title
<h2>Category 2</h2>
Entry 3 title
Entry 4 title
<h3>Subcategory of Category 2</h3>
Entry 5 title
<h2>Category 3</h2>
Entry 6 title
Entry 7 title
Entry 1 title
Entry 2 title
<h2>Category 2</h2>
Entry 3 title
Entry 4 title
<h3>Subcategory of Category 2</h3>
Entry 5 title
<h2>Category 3</h2>
Entry 6 title
Entry 7 title
How can I do this? I've figured out how to display the h2-Category/h3-Subcategory relationship properly:
CODE
<MTHasNoParentCategory><h2>
<MTElse><h3></MTElse>
</MTHasNoParentCategory>
<a href="<MTArchiveLink archive_type="Category">" name="<MTCategoryLabel dirify="1">" style="color : black;"><MTCategoryLabel smarty_pants="1"></a>
<MTHasNoParentCategory></h2>
<MTElse></h3></MTElse>
</MTHasNoParentCategory>
<MTElse><h3></MTElse>
</MTHasNoParentCategory>
<a href="<MTArchiveLink archive_type="Category">" name="<MTCategoryLabel dirify="1">" style="color : black;"><MTCategoryLabel smarty_pants="1"></a>
<MTHasNoParentCategory></h2>
<MTElse></h3></MTElse>
</MTHasNoParentCategory>
Listing the actual entries is what is giving me trouble. My results:
CODE
<h2>Category 1</h2>
Entry 1 title
Entry 2 title
<h2>Category 2</h2>
Entry 3 title
Entry 4 title
<h3>Subcategory of Category 2</h3>
Entry 5 title
<h2>Category 3</h2>
Entry 5 title
Entry 5 title
Entry 1 title
Entry 2 title
<h2>Category 2</h2>
Entry 3 title
Entry 4 title
<h3>Subcategory of Category 2</h3>
Entry 5 title
<h2>Category 3</h2>
Entry 5 title
Entry 5 title
So it looks to me like after processing the entries in the subcategory it doesn't know to start at a parent category again. My code:
CODE
<ul>
<MTEntriesWithSubCategories sort_order="descend">
<li><MTEntryDate format="%Y/%m/%d">: <a href="<MTEntryLink>"><MTIfEqual a="[MTEntryKeywords]" b="article"><b><MTEntryTitle smarty_pants="1"></b></MTIfEqual><MTIfEqual a="[MTEntryKeywords]" b=""><MTEntryTitle smarty_pants="1"></MTIfEqual></a></li>
</MTEntriesWithSubCategories>
</ul>
<MTSubCatsRecurse>
<MTEntriesWithSubCategories sort_order="descend">
<li><MTEntryDate format="%Y/%m/%d">: <a href="<MTEntryLink>"><MTIfEqual a="[MTEntryKeywords]" b="article"><b><MTEntryTitle smarty_pants="1"></b></MTIfEqual><MTIfEqual a="[MTEntryKeywords]" b=""><MTEntryTitle smarty_pants="1"></MTIfEqual></a></li>
</MTEntriesWithSubCategories>
</ul>
<MTSubCatsRecurse>
Help! What am I missing? Any ideas?