<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html" />
  <link rel="self" type="application/atom+xml" href="http://forums.movabletype.org/atom.xml" />
  <id>tag:forums.movabletype.org,2011://24/tag:forums.movabletype.org,2009://24.15815-</id>
  <updated>2011-09-01T02:24:07Z</updated>
  <title>Comments for altering the archive template</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2009://24.15815</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.movabletype.org/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=24/entry_id=15815" title="altering the archive template" />
    <published>2009-07-01T16:35:43Z</published>
    <updated>2009-07-01T21:18:41Z</updated>
    <title>altering the archive template</title>
    <summary>Hey, I&apos;m attempting to get my archives page to do two different things and running into a wall. 1) I&apos;d like for archives to be organized by year, not months. Here&apos;s the page: http://southeastreview.org/archives.html. So instead of a list of...</summary>
    <author>
      <name>josh</name>
      
    </author>
    
    <category term="Design, Templates, &amp; Tags" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>Hey, I'm attempting to get my archives page to do two different things and running into a wall. </p>

<p>1) I'd like for archives to be organized by year, not months. Here's the page: http://southeastreview.org/archives.html. So instead of a list of clickable months, I'd like a list of clickable years. Even better would be just a long list of entries with date headers, like this: http://southeastreview.org/onlinearchive.php</p>

<p>2) I'd like to exclude two categories from showing up on the archive page. Or, if it's easier, only include categories x, y, and z from showing up in the archives.</p>

<p>Thanks for your help!</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15815-comment:25903</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15815" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html#c25903" />
    <title>Comment from Mike T on 2009-07-01</title>
    <author>
        <name>Mike T</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>1) You will need to enable yearly archives first. Open up the monthly listing template in the template editor, go to the bottom of the editor and create a new mapping for "yearly" archives. Then, open the Archive Index template, and modify one of the examples in there for an archive listing so that instead of doing, say, Category-Monthly, it does Yearly instead.</p>

<p>2) Modify the category listing in that index template to look similar to this:</p>

<p>&lt;mt:TopLevelCategories&gt;<br />
&lt;mt:If tag="CategoryLabel" eq="Value1 or Value2"&gt;</p>

<p>&lt;/mt:If&gt;<br />
&lt;/mt:TopLevelCategories&gt;<br />
</p>]]>
    </content>
    <published>2009-07-01T17:31:14Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15815-comment:25905</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15815" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html#c25905" />
    <title>Comment from josh on 2009-07-01</title>
    <author>
        <name>josh</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Thanks. First issue solved. I didn't realize the mapping option was there. </p>

<p>I'm not quite understanding your solution for #2. This is the main archive.html page I'm trying to get it to list only items from certain categories. And the tags you mention aren't included on that page. I'm guessing you're suggesting I add them somewhere in the loop on that page but I'm not sure where.</p>

<p>This seems to be the code that's generating the archives list:</p>

<pre>
&lt;mt:ArchiveList archive_type="Yearly"&gt;
        &lt;mt:ArchiveListHeader&gt;
                         
                                &lt;div class="archive-content"&gt;
                                    &lt;ul&gt;
        &lt;/mt:ArchiveListHeader&gt;
                                        &lt;li&gt;&lt;a href="&lt;$mt:ArchiveLink$&gt;"&gt;&lt;$mt:ArchiveTitle$&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;mt:ArchiveListFooter&gt;
&lt;li&gt;&lt;a href="http://southeastreview.org/old-archives.html"&gt;(older)&lt;/a&gt;&lt;/li&gt;
                                    &lt;/ul&gt;
                                &lt;/div&gt;
        &lt;/mt:ArchiveListFooter&gt;
    &lt;/mt:ArchiveList&gt;
</pre>

<p>So where would categories tag go in there?</p>

<p>Thanks again.</p>]]>
    </content>
    <published>2009-07-01T17:54:39Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15815-comment:25911</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15815" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html#c25911" />
    <title>Comment from Mike T on 2009-07-01</title>
    <author>
        <name>Mike T</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You should have a category listing block in the Archive Index. That's what you need to modify.</p>]]>
    </content>
    <published>2009-07-01T19:19:54Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15815-comment:25923</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15815" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/altering-the-archive-template.html#c25923" />
    <title>Comment from josh on 2009-07-01</title>
    <author>
        <name>josh</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>That wasn't quite the answer, probably because I was asking the question wrong. I figured it out so I'll share in case it helps someone else. Basically, I have yearly archives. You click on the year and you're taken to a list of posts from that year, which I wanted to limit by category. That is, I didn't want some posts to ever show up in the archives.</p>

<p>My mistake was thinking I needed to alter the Archives Index page. Maybe that would have done it, except I'm archiving by date, not category. What I needed to alter was the Montly Entry Listing template, specifically the <pre>&lt;mt:entries&gt;</pre> tag within it. At that point, it's simple since the mt:entries tag can take a category attribute. So what I ended up with is <pre>&lt;mt:entries category="NOT apples AND NOT oranges"&gt;</pre>. And now there are no apples and oranges in my archives. </p>

<p>Thanks again for your help. </p>]]>
    </content>
    <published>2009-07-01T21:18:41Z</published>
  </entry>

</feed>

