Parent category pages

Apr 14, 2009 at 8:26 AM
Hi all,

Recently installed the blog engine script and am overall very happy with it.  One thing I would like to know however is how to get parent category pages to display the posts of all the categories under them?

I have a general news category that I'd like to use for Google News et al, with various categories of news underneath it, but at the moment nothing is being shown in the parent category.

Do you need to select both categories when creating a post or is there a way of displaying it automatically?

Apr 15, 2009 at 6:36 AM
The only thing I'm aware of that parent categories does is display the parent/child relationship in the Category List widget.  So, in the widget, you would see:

Parent Category (3)
Parent Category - Child Category (4)

I'm not sure if there's anything else assigning a parent category does.  So you might be stuck selecting both categories for now ... sorry :(
Apr 15, 2009 at 7:19 AM
No problem :)

One other thing I found that may be of interest, is that when choosing a child category, the links in the category menu don't work because they look for a folder (ie the parent folder) that doesn't exist.
Apr 15, 2009 at 7:57 AM
Are you using BE 1.4.5?  This problem was corrected sometime after the 1.4.5 release.  It can be fixed by modifying the CategoryList.cs file in the App_Code\Controls folder.  See the comments in this recent issue.  The person fixed it by using the latest version of the CategoryList.cs file.  The latest version of that file is here.
Apr 15, 2009 at 8:01 AM
It was downloaded 3 weeks ago.  I can't see any version number in the admincp but unless a new release has come out in the last month I should think it would be the latest version (it was installed by IT y'see)
Apr 15, 2009 at 8:07 AM
Offhand, I don't know which version this was fixed in.  But in the footer of your blog, there should be a version number.  Something like "Powered by BlogEngine 1.4.5".

New builds come out pretty frequently.  I just released a new build earlier tonight.  And the latest major stable release of BE, version 1.5, was just released yesterday.  Version 1.4.5 was released in August 2008.

You can also check your CategoryList.cs file.  If you see the line below, that is the problem.

anc.HRef = Utils.RelativeWebRoot + "category/" + Utils.RemoveIllegalCharacters(key) + BlogSettings.Instance.FileExtension;
Apr 15, 2009 at 8:12 AM
Dare say we have an outdated version then.  Thanks Ben.