Category links in a Movable Type toolbar

Here is an example of the markup needed to selectively add two categories to the toolbar in the Professional Website template set. Manage->Categories will have the ID numbers of the categories used in a blog.

<mt:Categories>
    <mt:If tag="CategoryID" eq="113">
        <li><a href="<mt:ArchiveLink/>"><mt:CategoryLabel/></a></li>
    <mt:Else tag="CategoryID" eq="114">
        <li><a href="<mt:ArchiveLink/>"><mt:CategoryLabel/></a></li>
    </mt:If>
</mt:Categories>

As of 4.25, <mt:Categories> does not support limiting its result set based on an ID attribute, so you couldn't have two <mt:Categories> blocks that look like <mt:Categories id="113">.

Leave a comment

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Recent Entries

A window into the totalitarian mind of the left on freedom of religion
From Digg: Me: I'm not going to hold my breath waiting for the same liberal democrats who shriek about the…
Google's lossy compiler
Google's closure compiler service gets a little too frisky under ADVANCED_OPTIMIZATIONS. Original code: With advanced optimizations enabled, it was able…
The three purposes of the federal income tax law
Businesses will spend about 3.4 billion man-hours and individuals about 1.7 billion hours figuring out their taxes this year.…

Subscribe

Advertisements

OpenID accepted here Learn more about OpenID