Help - Search - Members - Calendar
Full Version: Category Display Issues
Movable Type Community Forum > Using Movable Type > Templates and Tags
2much
Hello. I would love some help with something that I've been toying with for days (unsuccessfully).

I would like to set up my template so that when a category is created, the category page only displays listings from that same category.

At the moment, every category page displays listings from every category.

Here's an example:
Hispanic Watch

Any ideas what tags I can use so that each category page only links to entries in the same category?
gvtexas
Can you post the MT code on your main page for the section where you list the links to the categories, and then post the MT code from your category archive page, but only the section between the MTEntries and /MTEntries tags. Sounds like it's your choice of category archives tags that's doing it.

To post code, copy it first, then in the post message form here click the CODE button above the entry window, paste in your copy, then click the CODE button again. Do this for each of the code snippets mentioned above.
2much
This is from the category archive page:

CODE
<MTCategories show_empty="1"><br>
 
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a><br><br>
 
</div>

<div class="texto">
<MTEntries category="<$MTCategoryLabel$>

<a href="<$MTEntryPermalink$>"> <$MTEntryTitle$></a></span><br /><br>

 </MTEntries>
 <br /><br />


</MTCategories>


This is where I link to the categories:

CODE
<MTCategories>
 <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a><br>
 <br /><br />
</MTCategories>


Thanks for your help!
gvtexas
To start with, if this is the copy you lifted, there's typo. This line:

CODE
<MTEntries category="<$MTCategoryLabel$>
...should be
<MTEntries category="<$MTCategoryLabel$>">


See if that helps. There is some other unnecessary code in your archive page (your main index codes are fine) but unfortunately I have to dash and can't type the corrected code here. Just had time to notice the oops above. Will do so when I get back, unless someone else pops in....

smile.gif
gvtexas
Sorry, back.

Compare your code to one I use on a blog that shows the category name at the top of the list, and a list of entries in that category showing the entry title and date posted.

Your code in the category archive template:
CODE
<MTCategories show_empty="1"><br>
 
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a><br><br>
 
</div>

<div class="texto">
<MTEntries category="<$MTCategoryLabel$>

<a href="<$MTEntryPermalink$>"> <$MTEntryTitle$></a></span><br /><br>

 </MTEntries>
 <br /><br />


</MTCategories>

Compare that to this code:
CODE
<div class="ctitle">
<i>Topic:</i>  <MTArchiveCategory upper_case="1"></div>

<div class="blogbody">
<MTEntries sort_order="ascend" sort_by="title">

    <div class="cat-title">
               <a href="<MTEntryPermalink>"><MTEntryTitle></a>  <span class="posted"><i>(posted <MTEntryDate format="%m/%d/%y">)</i></span></div>

</MTEntries>


You don't need the category tags as you've shown them. My code above will give this result.

Also, you show links to your categories on your category archive page within the content area, yet you also have links out in the left column. Is there a specific reason for the redundancy?
2much
PERFECT!!! Thank you soo soo much, I really appreciate it, I've tinkered with this for at least 15 hours, THANK YOU! Check it out now, it looks great (or it will once I fix the stylesheet).
Lighter
Thank you! This helped me solve a related problem.
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.