Help - Search - Members - Calendar
Full Version: Calendar For Current Week Only
Movable Type Community Forum > Additional Resources > Tips and Tricks
sintax
Hey everyone!

I want to put a thing in my sidebar called "The Week In Review" where it will output a calendar style display but for only the current day and then the previous six.

I don't want the titles of the entries displayed or anything... just the dates like a regular calendar that MT produces. "Active Dates" (i.e. the ones with posts linked to them) would display as links... just like the regular calendar.

It would look like this:

CODE
The Week In Review
---------------------------
16 17 18 19 20 21 22


I just need help in getting the calendar to display that type of limited date range. Anyone out there mind helping me out?

Thanks,
Abraham
sintax
P.S. > Here is my current calendar code now:

CODE
<MTCalendar>
<MTCalendarIfEntries>
<MTEntries lastn="1">
<a href="<$MTEntryPermalink archive_type="Individual"$>"><img src="/images/calendar/<$MTCalendarDay$>-on.gif" border="0"></a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<img src="/images/calendar/<$MTCalendarDay$>-off.gif" border="0">
</MTCalendarIfNoEntries>
<MTCalendarIfBlank>
<img src="/images/calendar/empty.gif" border="0">
</MTCalendarIfBlank>
</MTCalendar>


This shows the entire month though sad.gif
maddy
Perhaps the SomeDays plugin might be useful to you? smile.gif
maddy
Here's the basic codes you'd need for for the SomeDay tags to get the last seven days, linked if there is an entry, just the number if there is not. Is that what you were after? smile.gif
CODE
<MTSomeDays date="today" select="-7">
<MTSDIfEntries>
               <MTEntries lastn="1">
                 <a href="<$MTEntryPermalink$>">
                   <$MTSDWorkDate format="%d"$>
                 </a>
               </MTEntries>
             </MTSDIfEntries>

<MTSDIfNoEntries>
<$MTSDWorkDate format="%d"$>
</MTSDIfNoEntries>
</MTSomeDays>
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.