My favorites | Sign in
Project Logo
                
Search
for
Updated May 06, 2009 by hirotaka...@gmail.com
Labels: Featured, MT, Plugin, MT4
SortableCategories  
A plugin for realizing Sortable Categories and Folders.

SortableCategories Plugin

A plugin for realzing Sortable Categories and Folders.

Changes

Overview

SortableCategories plugin allows you to arrange the orders of category and folder lists as you need.

This plugin is designed to work with Movable Type 4.2 or later and does not support dynamic publishing at this moment.

Installation

  1. Download and extract SortableCategories-version.zip file.
  2. Upload or copy the contents of "SortableCategories-version/plugins" directory into your MT "plugins" directory.
  3. Upload or copy the contents of "SortableCategories-version/mt-static/plugins" directory into your MT "mt-static/plugins" directory.
  4. After proper installation, you will find "SortableCategories" plugin listed on the "System Plugin Settings" screen.

How to use

If you want to arrange the order of categories:

You can also arrange the order of folders in the same way.

Tags

This plugin does not provide any tags, but one sort_method, named "SortableCategories::sorter".

In order to render a "sorted" category tree, you should replace original "Category Archives" widget with the following one:

<mt:IfArchiveTypeEnabled archive_type="Category">
<div class="widget-archive widget-archive-category widget">
    <h3 class="widget-header">Category</h3>
    <div class="widget-content">
    <mt:TopLevelCategories sort_method="SortableCategories::sorter">
        <mt:SubCatIsFirst>
        <ul>
        </mt:SubCatIsFirst>
        <mt:If tag="CategoryCount">
            <li><a href="<$mt:CategoryArchiveLink$>"<mt:If tag="CategoryDescription"> title="<$mt:CategoryDescription remove_html="1" encode_html="1"$>"</mt:If>><$mt:CategoryLabel$> (<$mt:CategoryCount$>)</a>
        <mt:Else>
            <li><$mt:CategoryLabel$>
        </mt:If>
        <$mt:SubCatsRecurse$>
            </li>
        <mt:SubCatIsLast>
        </ul>
        </mt:SubCatIsLast>
    </mt:TopLevelCategories>
    </div>
</div>
</mt:IfArchiveTypeEnabled>

See Also

License

Copyright (c) 2009 Hirotaka Ogawa <hirotaka.ogawa at gmail.com>. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of either:


Sign in to add a comment
Hosted by Google Code