<?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/11/sort-based-on-custom-field.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.11400-</id>
  <updated>2011-09-01T02:26:50Z</updated>
  <title>Comments for Sort Based on Custom Field</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.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=11400" title="Sort Based on Custom Field" />
    <published>2008-11-20T23:12:55Z</published>
    <updated>2009-03-18T15:18:50Z</updated>
    <title>Sort Based on Custom Field</title>
    <summary>Can some body share the template code to sort the entries based on a custom field. The requirement is to show entries based on the priority of the given entry. The only solution which comes to my mind is to...</summary>
    <author>
      <name>Ashish Nagpal</name>
      
    </author>
    
    <category term="Design, Templates, &amp; Tags" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>Can some body share the template code to sort the entries based on a custom field.</p>

<p>The requirement is to show entries based on the priority of the given entry. The only solution which comes to my mind is to add a custom field and sort it based on it.</p>

<p>If some body has a better solution, please do share it on this forum</p>

<p>Thanks in advance</p>
]]>
      

    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:14574</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c14574" />
    <title>Comment from Brad Choate on 2008-11-20</title>
    <author>
        <name>Brad Choate</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Sure, here's the syntax:</p>

<p>    </p>

<p>Documented <a href="http://movabletype.org/documentation/appendices/tags/entries.html" rel="nofollow">here</a>:</p>

<p>> If you have the Professional Pack installed, with custom fields, you may specify a custom field basename to sort the listing, by giving a sort_by value of field:basename (where 'basename' is the custom field basename you wish to sort on).</p>]]>
    </content>
    <published>2008-11-21T01:01:00Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:14596</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c14596" />
    <title>Comment from Ashish Nagpal on 2008-11-21</title>
    <author>
        <name>Ashish Nagpal</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>THANKS BRAD !</p>

<p>This is what I got from the sample template code of my custom field:</p>

<p><br />
News Priority: <br />
</p>

<p>With the basename as "news_priority" </p>

<p>And I was using "MTentry_news_priority" instead of basename because of which it was not sorting on the custom field.</p>]]>
    </content>
    <published>2008-11-21T18:46:18Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:14598</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c14598" />
    <title>Comment from Ashish Nagpal on 2008-11-21</title>
    <author>
        <name>Ashish Nagpal</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Working Code: <pre></pre></p>]]>
    </content>
    <published>2008-11-21T18:49:41Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:15330</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c15330" />
    <title>Comment from Ashish Nagpal on 2008-12-18</title>
    <author>
        <name>Ashish Nagpal</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>another option is to use MT Order Plugin</p>]]>
    </content>
    <published>2008-12-18T21:56:44Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:16928</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c16928" />
    <title>Comment from Sue on 2009-01-26</title>
    <author>
        <name>Sue</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Darned if I can get this working in MT4.23. <br />
My custom field basename is folderorder, and my code is:</p>

<pre>
&lt;MTToplevelFolders sort_by=&quot;field:folderorder&quot; sort_order=&quot;ascend&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;&lt;MTBlogURL&gt;&lt;MTFolderBasename&gt;/&quot;&gt;&lt;MTFolderLabel&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/MTToplevelFolders&gt;
</pre>

<p>Any idea what I'm doing wrong?  Thanks!</p>]]>
    </content>
    <published>2009-01-26T15:36:13Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:17881</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c17881" />
    <title>Comment from Jay Allen on 2009-02-06</title>
    <author>
        <name>Jay Allen</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Caribou sue, your code got eaten.  Might want to try again.  In any case, the whole thing is documented <a href="http://movabletype.org/documentation/appendices/tags/entries.html" rel="nofollow">here</a>, as Brad mentioned.<br />
</p>]]>
    </content>
    <published>2009-02-06T10:10:56Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:17883</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c17883" />
    <title>Comment from Su on 2009-02-06</title>
    <author>
        <name>Su</name>
        <uri>http://onmovabletype.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://onmovabletype.com">
        <![CDATA[<p>[Fixed Sue's code for display]</p>]]>
    </content>
    <published>2009-02-06T10:42:18Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:18615</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c18615" />
    <title>Comment from gnp on 2009-02-15</title>
    <author>
        <name>gnp</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>All right: I've read the documentation, I've searched this and other forums, I have v4.23 with the Professional Pack; and confound it, MT won't sort entries according to any of my custom fields.</p>

<p>Excuse the formatting -- you know what I mean!</p>

<p>[mt:Entries sort_by="field:rating"][output styling, etc.][/mt:Entries]</p>

<p>The above code is for a category page. It appears only to output entries according to weblog defaults (i.e., sorted by author date and in descending order). My field in question is single-line text and numerical (10-50); and "rating" is, indeed, the basename. Attempts with other fields have failed as well.</p>

<p>What have I missed?</p>]]>
    </content>
    <published>2009-02-15T22:55:49Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:18627</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c18627" />
    <title>Comment from Ken Edwards on 2009-02-15</title>
    <author>
        <name>Ken Edwards</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Wouldn't it be EntryDataRating?</p>]]>
    </content>
    <published>2009-02-16T04:16:00Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:18641</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c18641" />
    <title>Comment from gnp on 2009-02-16</title>
    <author>
        <name>gnp</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't believe so, since EntryDataRating is the field's template tag; not its basename.</p>

<p>I've run my problem past a couple others, and they believe my follows directions provided in MT's documentation, which leaves me even more confused!</p>

<p>Are there any examples of this feature implemented successfully? Does it even work?</p>]]>
    </content>
    <published>2009-02-16T14:27:38Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:18695</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c18695" />
    <title>Comment from Ken Edwards on 2009-02-16</title>
    <author>
        <name>Ken Edwards</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't know but this is very important to me as I will be using it in a directory app I am writing. I have paid support though so when I get to that river I will ask them about it.</p>]]>
    </content>
    <published>2009-02-17T00:58:18Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:18697</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c18697" />
    <title>Comment from gnp on 2009-02-16</title>
    <author>
        <name>gnp</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>It's appreciated, Ken. Let us know!</p>]]>
    </content>
    <published>2009-02-17T02:54:34Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:19411</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c19411" />
    <title>Comment from Jay Allen on 2009-03-03</title>
    <author>
        <name>Jay Allen</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Some possibly relevant cases in FogBugz:</p>

<ul>
<li><a href="http://bugs.movabletype.org?79494" rel="nofollow">Case 79494: Support for filtering entries based on a custom field</a></li>
<li><a href="http://bugs.movabletype.org?79700" rel="nofollow">Case 79700: Some of customfields cannot filter/sort entries with dynamic publishing</a></li>
<li><a href="http://bugs.movabletype.org?98025" rel="nofollow">Case 98025: Feedback: mt:Entries sort_by custom field doesn't work on archive listings</a></li>
</ul>]]>
    </content>
    <published>2009-03-04T00:40:27Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:19649</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c19649" />
    <title>Comment from Faizal Heesyam on 2009-03-05</title>
    <author>
        <name>Faizal Heesyam</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>correct me if im wrong, but somehow i read somewhere in the wiki, sorting based on custom field only support Entries at the moment?</p>

<p><a href="http://wiki.movabletype.org/Custom_Category_Sorting" rel="nofollow"><a href="http://wiki.movabletype.org/Custom_Category_Sorting" rel="nofollow">http://wiki.movabletype.org/Custom_Category_Sorting</a></a></p>]]>
    </content>
    <published>2009-03-06T07:16:03Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:19687</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c19687" />
    <title>Comment from gnp on 2009-03-06</title>
    <author>
        <name>gnp</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Those are definitely relevant, Jay. Case 98025 describes my problem. I note with some dismay, however, that it hasn't been resolved; perhaps because the error has been poorly articulated. What Chieko means is that on archive pages, the sort command is ignored, and entries are displayed as if from an unmodified  tag.</p>]]>
    </content>
    <published>2009-03-06T15:34:55Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:20157</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c20157" />
    <title>Comment from Anonymous on 2009-03-15</title>
    <author>
        <name>Anonymous</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>So, is it in fact the case that this only sorts Entries? I *really* need to be able to do a custom sort of folders, not just entries. :( I have the custom field for folders, but the sort_by field:basename doesn't seem to work for them.</p>]]>
    </content>
    <published>2009-03-16T00:41:34Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2008://24.11400-comment:20319</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2008://24.11400" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2008/11/sort-based-on-custom-field.html#c20319" />
    <title>Comment from gnp on 2009-03-18</title>
    <author>
        <name>gnp</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p><a href="http://forums.sixapart.com/lofiversion/index.php/t66612.html" rel="nofollow">There is a solution for sorting entries</a>, via a custom field, on a category page. It's a redundant workaround, but I have confirmed that it works.</p>]]>
    </content>
    <published>2009-03-18T15:18:50Z</published>
  </entry>

</feed>

