Feb 5, 2012 at 7:10 PM
Edited Feb 6, 2012 at 4:00 PM
Still plugging away.
Been testing something locally and it works well, it's based on the notion that a parent category should include all posts for the parent category as well as all posts in any child categories.
For example, related categories:
General - having 2 posts of it's own, Specific - having 1 post of it's own and Very Specific - having 1 post of it's own displays as follows:
General Category (4)
Specific Category (2)
Very Specific Category (1)
So if you click on General Category it shows 4 posts: 2 General, 1 Specific and 1 Very Specific. Clicking on Specific shows it's own Specific post and the single post in Very Specific.
Under the bonnet this works by looking at each post's category list and if any category has a parent, then it gets added to the post category list (the routine being triggered by post or category changes). Any parent child relationship is then rendered as
nested lists to represent the hierarchy and can be styled to suit.
However, this has implications for:
1. Post data integrity
2. Category links in post headers
3. Archive listings
Changes made to the post category lists are not automatically reversible and you might not be comfortable with a control changing your post data.
Category links in post headers would by default, show links from the full parent child trail, this could be filtered but has introduced a dependency: code would have to be added to the theme's post view to handle this. Likewise for the archive page.
With the standard category control or widget if you click on a category it shows the posts for that specific category only, which is great if there is no parent child relationship. On checking the URL you see something like "/category/Articles.aspx" The
mechanics of how this happens probably holds the key to a nice solution, but I can't locate this in code - anybody got any hints, suggestions?
Palm to head, default.aspx for displaying cat groups. Checking out syndication options for feed buttons, would much prefer to avoid adding to post category lists.