movabletype

Movable Type archive pages – show all entries in a top-level category or its subcategories


I have a MT blog. Originally it had a bunch of categories:

We've expanded our content and created some parent categories:

All of the newly-written Entries have been added to both the top-level category and whatever sub-categories are appropriate. However, the old entries are only tagged with the original category they belonged to, which is now a subcategory. Therefore, the old entries do not appear in the category index pages for top-level categories (Animal/, Vegetable/, or Mineral/).

We don't want to have to manually edit every single old entry to add the correct top-level category. Is there a way to tell the Category Archive / Index page to include any entry that either in the TLC or one of its subcategories, without duplicating the entries? In other words, "Mineral" should list unique entries that are in Mineral, Iron, Copper, or Silver.

Any other suggestions?


Solution

  • If you are in an 'entry listing' (category archive) context/template it should be enough to add:

    include_subcategories="1"
    

    to your 'mt:Entries' loop, just like on this sample:

    <mt:Entries include_subcategories="1">
    ...
    </mt:Entries>
    

    You may have to add at least one entry directly to the parent / top-level category to get the page to generate.