Help - Search - Members - Calendar
Full Version: List Of Entries Under Tag Headings
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
othello
I am using tags as a secondary way to sort entries (category is the primary way) and I want to produce a list like this:

tag name
- entry
- entry

tag name
- entry

tag name
- entry
- entry
etc

i had thought i could do something like

CODE
    <mt:Tags>
            <h3><mt:tagname></h3>
                <ul class="bulletless">
                <mt:entries>
                <li><MTentrydatalocation>, <a href="<mt:entrypermalink>"><mt:entrytitle></a>, <mt:entrycategories><mt:entrycategory glue=", "></mt:entrycategories>, <mt:entrydate format="%Y"></li>
                </mt:entries></ul>
            </mt:Tags>


but this doesn't work. is what i am trying to achieve possible?
caribou sue
Hi there,
You just need to tell MT that you want the entries just for the tag you're referring to. Enter the variable:

CODE
<mt:Tags>
   <mt:tagname>
   <MTSetVarBlock name="tag"><mt:tagname></MTSetVarBlock><!-- for each run through the tags, set the tag as a variable-->
    <ul>
       <mt:entries tag="$tag"> <!--now MT will grab entries for each tag as it iterates through-->
          <li><mt:entrytitle></li>
       </mt:entries>
    </ul>
</mt:Tags>
Dennis Ng-Kwing-Cheung
QUOTE (caribou sue @ Jun 3 2008, 03:23 PM) *
Hi there,
You just need to tell MT that you want the entries just for the tag you're referring to. Enter the variable:

CODE
<mt:Tags>
   <mt:tagname>
   <MTSetVarBlock name="tag"><mt:tagname></MTSetVarBlock><!-- for each run through the tags, set the tag as a variable-->
    <ul>
       <mt:entries tag="$tag"> <!--now MT will grab entries for each tag as it iterates through-->
          <li><mt:entrytitle></li>
       </mt:entries>
    </ul>
</mt:Tags>



Thank you for this piece of code. But how would I go about limiting the list to just one tag, for example "favourites". I've tried everything and still can't get it to work. Any help would be greatly appreciated.

Dennis.
OtherNiceMan
QUOTE (Dennis Ng-Kwing-Cheung @ Jul 10 2008, 10:53 AM) *
QUOTE (caribou sue @ Jun 3 2008, 03:23 PM) *
Hi there,
You just need to tell MT that you want the entries just for the tag you're referring to. Enter the variable:

CODE
<mt:Tags>
   <mt:tagname>
   <MTSetVarBlock name="tag"><mt:tagname></MTSetVarBlock><!-- for each run through the tags, set the tag as a variable-->
    <ul>
       <mt:entries tag="$tag"> <!--now MT will grab entries for each tag as it iterates through-->
          <li><mt:entrytitle></li>
       </mt:entries>
    </ul>
</mt:Tags>



Thank you for this piece of code. But how would I go about limiting the list to just one tag, for example "favourites". I've tried everything and still can't get it to work. Any help would be greatly appreciated.

Dennis.


So what is happening if you do this?

CODE
<mt:Tags>
   <mt:tagname>
   <MTSetVarBlock name="favourites"><mt:tagname></MTSetVarBlock><!-- for each run through the tags, set the tag as a variable-->
    <ul>
       <mt:entries tag="$tag"> <!--now MT will grab entries for each tag as it iterates through-->
          <li><mt:entrytitle></li>
       </mt:entries>
    </ul>
</mt:Tags>


could you post a link to the output?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.