New Feature: Category Header Static Page
Tags: New Features Static Page
One of the things I really like about Blogsphere is its nice ability to tag the blog entries and then later show all the blog-entries within that tag. If I for example write a blog-entry with the tag "New Features", I can easily see all the entries within the "New Features"-topic. However, I thought it would be nice to have a type of category header on top of all blog entries. It look like this;
One of the things I really like about Blogsphere is its nice ability to tag the blog entries and then later show all the blog-entries within that tag. If I for example write a blog-entry with the tag "New Features", I can easily see all the entries within the "New Features"-topic. However, I thought it would be nice to have a type of category header on top of all blog entries. It look like this;
Note how the red rectangle shows the static Category Header page, followed by the ordinary blog-entries within the "New Features" category.
Also note that the static page doesn't show the footer-part, and this is controlled by the new "Category Header"-part of the page templates's Document definitions;
Now, how do the code know when to display a Category Header or not? Simply by having a static page with a specially prepped permalink code!
If you want a Category Head, simply assign the "cathead: " + the category code as the permalink;
I know that the Category Head could/should probably be a separate type of page, and as so don't interfere with the ordinary static pages.
However, the current implementation has very simple and effective plug-in logic and doesn't mess up the existing code too much
This feature is implemented by adding the RenderCategoryHeaderStaticPage to the script library RenderEngine.Blog. It looks like this;
And this function is called from the RenderEngineArchiveList function, like this;
This makes the RenderEngineAcrhiveList first check whether we have a static page with the permalink code equal to "cathead: " + currenttag, and thus render that static page first, before the ordinary blog entries.
You can see this feature in play if you click on the New Features in the tag cloud!
