Help - Search - Members - Calendar
Full Version: Using Multiblog With Extra Fields
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
philippa
Folks,

I'm having trouble using the MultiBlog and Extra Fields plugins together in a template. I want to sort an included blog's entries by one of its Extra Fields, "Release_Date."

I thought I might do this:

CODE
<MTMultiBlogEntries include_blogs="52" sort_by="Release_Date">
<MTExtraFields>
<h4>
<a href="http://www.filminfocus.com/focus-movies/<$MTLink$>"><$MTEntryTitle$></a> -
<span class="release-date">
<MTFormatDate format="%B %d, %Y">
<$MTExtraFieldValue field="Release_Date"$>
</MTFormatDate>
</span>
</h4>
</MTExtraFields>
</MTMultiBlogEntries>


But that generates a publishing error starting, "unknown column: Release_Date."

So I thought I might do this:

CODE
<MTExtraFields>
<MTMultiBlogEntries include_blogs="52" sort_by="Release_Date">
<h4>
<a href="http://www.filminfocus.com/focus-movies/<$MTLink$>"><$MTEntryTitle$></a> -
<span class="release-date">
<MTFormatDate format="%B %d, %Y">
<$MTExtraFieldValue field="Release_Date"$>
</MTFormatDate>
</span>
</h4>
</MTMultiBlogEntries>
</MTExtraFields>


But that generates the publishing error: "Build error in template 'Focus Movies by Release Date': Error in <MTExtraFields> tag: You used an 'MTExtraFields' tag outside of the context of an entry; perhaps you mistakenly placed it outside of an 'MTEntries' container?"

So, skeptically, I thought I might do this:

CODE
<MTMultiBlogEntries include_blogs="52">
<MTEntries sort_by="Release_Date">
<MTExtraFields>
<h4>
<a href="http://www.filminfocus.com/focus-movies/<$MTLink$>"><$MTEntryTitle$></a> -
<span class="release-date">
<MTFormatDate format="%B %d, %Y">
<$MTExtraFieldValue field="Release_Date"$>
</MTFormatDate>
</span>
</h4>
</MTExtraFields>
</MTEntries>
</MTMultiBlogEntries>


That publishes, but of course loops through all the entries once per entry. I get 8 results returned 8 times, rather than 8 results returned once.

Thanks very much for any help.
philippa
Finally figured it out! I needed:

CODE
<MTMultiBlog include_blogs="52">
<MTEntries sort_by="Release_Date">
<MTExtraFields>
<h4>
<a href="http://www.filminfocus.com/focus-movies/<$MTLink$>"><$MTEntryTitle$></a> -
<span class="release-date">
<MTFormatDate format="%B %d, %Y">
<$MTExtraFieldValue field="Release_Date"$>
</MTFormatDate>
</span>
</h4>
</MTExtraFields>
</MTEntries>
</MTMultiBlog>
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-2010 Invision Power Services, Inc.