IPB

Welcome Guest ( Log In | Register )

Movable Type

We're moving to movabletype.org!

At long last, we're moving to forums powered by, well, Movable Type itself. You'll want to bookmark http://forums.movabletype.org/ for future reference, and in the meantime you can view these old forums as a read-only archive of past posts. Thanks for being part of the community!

 
Reply to this topicStart new topic
> Display Category Links Under A Parent Category
deanloh
post Oct 8 2005, 04:20 AM
Post #1





Group: Members
Posts: 12
Joined: 26-May 02
Member No.: 509



I have used MTLookup and scanned through hundreds of results still I failed to find what I'm looking for. If any of you have implemented this before, please share your technique.

I have a structure like this:

Hyperlinks
-- Personal
---- Books
---- Websites
---- Blogs
---- and the list goes on
-- Professional
---- Account Management
---- Project Management
---- Design
---- and the list goes on

Now I need MT to generate the list of category links under Personal only (Books, Websites etc) and output it to this:

CODE
<ul>
<li><a href="<books category archive>">Books</li>
<li><a href="<website category archive>">Website</li>
<li><a href="<blogs category archive>">Blogs</li>
<li>... and the list goes on
</ul>


I have tried MTFilterCategories plugin, problem is, I had to specify what categories to be included, which can be troublesome as I'll have to edit the code whenever I add new subcategories in future, same goes with the exclude function.

I'm just wondering: isn't there a way to make MT generate the list of subcategories under a specific main category only?

In short, I wish the following codes...

CODE
<ul>
 <MTCategories show_empty="1">
  <li><a href="<$MTCategoryArchiveLink$>">
  <$MTCategoryLabel$></a> (<$MTCategoryCount$>)</li>
 </MTCategories>
</ul>


can become this:

CODE
<ul>
 <MTCategories show_empty="1" category="Personal">
  <li><a href="<$MTCategoryArchiveLink$>">
  <$MTCategoryLabel$></a> (<$MTCategoryCount$>)</li>
 </MTCategories>
</ul>


Help?
Go to the top of the page
 
+Quote Post
telemark
post Oct 8 2005, 05:16 AM
Post #2





Group: Members
Posts: 333
Joined: 4-August 03
From: Manchester, England
Member No.: 14,259



Does this do it?
CODE
<MTSubCategories>
 <MTIfIsDescendant parent="Personal">
   <a href="<MTCategoryArchiveLink>"><MTCategoryLabel></a>
 </MTIfIsDescendant>
</MTSubcategories>

I must confess to not having tested this so would be interested in your feedback!
Go to the top of the page
 
+Quote Post
deanloh
post Oct 8 2005, 05:22 AM
Post #3





Group: Members
Posts: 12
Joined: 26-May 02
Member No.: 509



Thank you for the reply, telemark

I tried your code, no luck, it output only the archive link of "Personal"

But I still appreciate your attempt to help.
Go to the top of the page
 
+Quote Post
deanloh
post Oct 8 2005, 05:38 AM
Post #4





Group: Members
Posts: 12
Joined: 26-May 02
Member No.: 509



Inspired by telemark's suggestion, I tried this:

CODE
<ul>
<MTCategories show_empty="1">
<MTIfIsDescendant parent="Personal">
  <li><a href="<MTCategoryArchiveLink>"><MTCategoryLabel></a></li>
</MTIfIsDescendant>
</MTCategories>
</ul>


It worked!!! WHOA! At last! Thanks to telemark!!! biggrin.gif
Go to the top of the page
 
+Quote Post
azemat
post Oct 11 2005, 10:38 PM
Post #5





Group: Members
Posts: 32
Joined: 11-June 03
Member No.: 12,071



QUOTE (deanloh @ Oct 8 2005, 01:38 PM)
Inspired by telemark's suggestion, I tried this:

CODE
<ul>
<MTCategories show_empty="1">
<MTIfIsDescendant parent="Personal">
  <li><a href="<MTCategoryArchiveLink>"><MTCategoryLabel></a></li>
</MTIfIsDescendant>
</MTCategories>
</ul>


It worked!!! WHOA! At last! Thanks to telemark!!! biggrin.gif

Very very very very very very very very very Thansk!!!!!


--------------------
Go to the top of the page
 
+Quote Post
kelake
post Dec 8 2005, 01:38 AM
Post #6





Group: Members
Posts: 52
Joined: 5-May 02
From: Hsinchu, Taiwan
Member No.: 1,544



QUOTE (azemat @ Oct 12 2005, 06:38 AM)
QUOTE (deanloh @ Oct 8 2005, 01:38 PM)
Inspired by telemark's suggestion, I tried this:

CODE
<ul>
<MTCategories show_empty="1">
<MTIfIsDescendant parent="Personal">
  <li><a href="<MTCategoryArchiveLink>"><MTCategoryLabel></a></li>
</MTIfIsDescendant>
</MTCategories>
</ul>


It worked!!! WHOA! At last! Thanks to telemark!!! biggrin.gif

Very very very very very very very very very Thansk!!!!!
*



How to make it shows only the categories for that particular entry?


--------------------
Go to the top of the page
 
+Quote Post
pletch
post Sep 22 2006, 06:41 AM
Post #7





Group: Members
Posts: 6
Joined: 5-March 06
Member No.: 34,807



THANK YOU VERY MUCH!!!

SO helpful, I've been trying to figure this out for 2 days!!! Awesome, thanks!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 11.25.09 - 01:22 AM