Help - Search - Members - Calendar
Full Version: MTIfNewMonth
Movable Type Community Forum > Additional Resources > Tips and Tricks
gord
My problem is this.  On my category archive pages I would like the following:
CODE
<h1>December, 2002</h1>
<h2>December 31, 2002</h2>
<p>post</p>
<h2>December 20, 2002</h2>
<p>post>
...
<h1>November, 2002</h1>
<h2>November 30, 2002</h2>
<p>post</p>
<h2>November 20, 2002</h2>
<p>post>
...


Basically I need an MTIfNewMonth tag so that I can choose display code within the MTEntries tag only if it is a new month.  Or perhaps that is overly complex.  If you can think of any way to do this, I would greatly appreciate it.
medic119
There isn't a tag to do this, but you might try something in PHP which should handle it without a problem.

Check out Scriptygoddess.com.  They have a show/hide Comments script that you might could adapt to do what you are looking for.
staggernation
Christopher Laco wrote a DateHeaders plugin that includes MTMonthHeader and MTMonthFooter tags. I think it'll do what you're looking for. See this thread.
gord
Thanks.  I installed the MTDateHeaders plugin but it seems to be completely disregarding the tags that it supposedly enabled.  I am not sure exactly why.
claco
I'll assume you put MTDateHeaders.pm in ./extlib and MTDateHeaders.pl in ./plugins, and also have Date::Calc v5+ installed?

By ignore, do you mean that the new tagds print in the page instead of getting replaced?
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.