<?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/2008/12/primary-category-templates-only.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,2008://24.11635-</id>
  <updated>2011-09-01T02:26:48Z</updated>
  <title>Comments for Primary Category templates only?</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.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=11635" title="Primary Category templates only?" />
    <published>2008-12-04T06:36:04Z</published>
    <updated>2008-12-06T06:27:27Z</updated>
    <title>Primary Category templates only?</title>
    <summary>I&#8217;m trying to create an archive mapping but can&#8217;t seem to find out how to get it so that it will only create a file for that category if it&#8217;s a primary category and not a sub-category. For example, I...</summary>
    <author>
      <name>Carlo Laitano</name>
      <uri>http://www.decocreative.com</uri>
    </author>
    
    <category term="Design, Templates, &amp; Tags" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>I&#8217;m trying to create an archive mapping but can&#8217;t seem to find out how to get it so that it will only create a file for that category if it&#8217;s a primary category and not a sub-category.</p>

<p>For example, I have this category list:</p>

<p>Category 1
  - north
  - south
Category 2
  - west
  - north
Category 3
  - south</p>

<p>I want to create this file: http://www.mysite.com/category1/index.php
but it also creates: http://www.mysite.com/north/index.php</p>

<p>Any idea how I can avoid subcategory files to be created from that template?</p>
]]>
      

    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14893</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14893" />
    <title>Comment from Carlo Laitano on 2008-12-03</title>
    <author>
        <name>Carlo Laitano</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>The category list doesn't appear the way I typed it :S. Everything listed there is a category. The ones with dashes are sub-categories.</p>]]>
    </content>
    <published>2008-12-04T06:40:33Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14905</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14905" />
    <title>Comment from Mike T on 2008-12-04</title>
    <author>
        <name>Mike T</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Try wrapping the entire category archive with a HasNoParentCategory tag: <a href="http://www.movabletype.org/documentation/appendices/tags/hasnoparentcategory.html">http://www.movabletype.org/documentation/appendices/tags/hasnoparentcategory.html</a></p>]]>
    </content>
    <published>2008-12-04T19:14:36Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14909</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14909" />
    <title>Comment from Carlo Laitano on 2008-12-04</title>
    <author>
        <name>Carlo Laitano</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hmm, this work inside the template. It just outputs empty files. Thanks for the tip though, it will be usefull on other situations.  I don't think I'll find a way for those subcategories to not output files :(</p>]]>
    </content>
    <published>2008-12-04T20:23:36Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14911</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14911" />
    <title>Comment from Carlo Laitano on 2008-12-04</title>
    <author>
        <name>Carlo Laitano</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>What I did to solve this temporarily is set the templates to dynamic publishing. This way no actual files are created for any category/subcategory and only called if needed. I would still like to solve this for static publishing though.. would prove really useful.</p>]]>
    </content>
    <published>2008-12-04T20:31:47Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14927</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14927" />
    <title>Comment from Mike T on 2008-12-04</title>
    <author>
        <name>Mike T</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't know if you're comfortable with doing a little bit of Perl coding, but here is a possible way of doing that with a simple plugin. Based on this: <a href="http://www.movabletype.org/documentation/man/MT/WeblogPublisher.html#CALLBACKS">http://www.movabletype.org/documentation/man/MT/WeblogPublisher.html#CALLBACKS</a></p>

<p>Create a plugin that adds a callback to BuildFileFilter that checks the current category, and if it has a parent category, return false.</p>]]>
    </content>
    <published>2008-12-05T05:40:09Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14973</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14973" />
    <title>Comment from Mike T on 2008-12-05</title>
    <author>
        <name>Mike T</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><a href="http://www.codemonkeyramblings.com/plugins/subcategory-filter.php">Give this</a> a shot and tell me how it works for you.</p>]]>
    </content>
    <published>2008-12-05T21:21:52Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14975</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14975" />
    <title>Comment from Carlo Laitano on 2008-12-05</title>
    <author>
        <name>Carlo Laitano</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Oh this seems exactly what I need. I'll update to 4.23 first and then try it out! Thanks for the link :)</p>]]>
    </content>
    <published>2008-12-05T21:28:43Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11635-comment:14981</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11635" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/12/primary-category-templates-only.html#c14981" />
    <title>Comment from Carlo Laitano on 2008-12-05</title>
    <author>
        <name>Carlo Laitano</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I believe it works! Thanks Mike! :D</p>]]>
    </content>
    <published>2008-12-06T06:27:27Z</published>
  </entry>

</feed>

