Help - Search - Members - Calendar
Full Version: Calendar of events revisited
Movable Type Community Forum > Additional Resources > Tips and Tricks
nolageek
HEy there.  I'm going to be using (maybe, depends on if they like the site) for the New Orleans Gay and Lesbian Film Festival and I'm trying to show a list of movies  for the schedule page.

I have entered the films into the database as articles, placing them into various categories: Films, Schedule, and then into whatever category of genre they may fall. (Short Feature, Documentary, etc..)

For the schedule page, I am using the following code:

CODE
<MTEntries category="Schedule" sort_by="modified_on" sort_order="ascend''>

 <MTDateHeader>
       <table border="0" cellpadding="0">
         <td width="105" class="sch-date" valign="top">
<$MTEntryDate format="%a %b %e"$>
</td>
<td width="422" class="sch-title" valign="top">    
 </MTDateHeader>
<a name="<$MTEntryID$>"></a>
<$MTEntryTitle$>
<div class="small">Categories:<MTEntryCategories glue=", ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTEntryCategories>
</div><br />  
<MTDateFooter></td>
              </table>
 </MTDateFooter>
</MTEntries>


Two questions:

1: Why is the list coming out in reverse order?  I've tried using sort_order="descend" and "ascend" but it comes out the same way every time.

2: Also, is there a way to prevent "Films" and "Schedule" from showing on the list of categories?  They're mainly for back-end purposes, not really for the user to see.

Thanks so much!

Vincent
maddy
2. Check out the MTFilteredEntryCategories tag in the Filter Categories Plugin. If you install the plugin (mega-easy, by the way), you'd just need to replace
CODE
Categories:<MTEntryCategories glue=", ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTEntryCategories>
with
CODE
Categories:<MTFilteredEntryCategories exclude="Films|Schedule" glue=", ">
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTFilteredEntryCategories>


smile.gif

1. I don't know! It didn't work for me when I tested it with one  of my categories. Is there anything to stop you from changing the sort order in BlogConfig|Preferences to ascend? I guess that might not work if you want to have entries descending elsewhere on the site. Anyway, I'm sure someone can help more! biggrin.gif
nolageek
thanks maddie, that pluggin worked perfectly.  (I just need to re-work it so I dont get blank category listings.

Any have any ideas why #1 isn't working?

I DID go back and make the authored-on date/times reflect the actual date and time of the events.
nolageek
Ok, I tried using sort_order with a whole bunch of templates, sorting by title, modified_date, category, etc..  it never works.  I then reversed my "default" sort order and then everything flipped.  But I dont want it flipped throughout the site.. just in my schedule template.  Any ideas?  Is the sort_order screwed up in 2.5 or am I doing something wrong?

Vincent
nolageek
Hmmmm.  I still can't get this to re-sort using sort_order has anyoneused it and had it workwith 2.52?
girlie
CODE
<MTEntries category="Schedule" sort_by="modified_on" sort_order="ascend''>


See that last double quote after ascend? Well, it's actually two single quotes. Replace those with a real double quote and you should be all fixed up!!
bmk
good eye girlie!   wink.gif  ;)  ;)
nolageek
OMG!  I have been wrestling with that since Friday night.  I am *SUCH* a moron sometimes!  :)  I swear, it's always something simple like that.

Thank you sooooooooooooooooooooooooo much!!

Vincent
girlie
Brenna: Ironic, isn't it, considering what I just posted elsewhere about double/single quotes. Heh!

Vincent: Sorry you suffered so much. I guess this thread slipped by me.
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.