Help - Search - Members - Calendar
Full Version: Calendar mod
Movable Type Community Forum > Additional Resources > Tips and Tricks
holiday
Here's what I'd like to do with the small calendar on the main page:

Put a prev and next month button left and right of the month shown.

Clicking prev or next button opens up 1st archived page of that month. So if the previous month my 1st entry was on the 3rd that would be the entry shown (I only show 1 entry per page). The calendar would of course have to reflect the current month in each archive. Going ahead of current date would show only the latest month current (no future postings).

What plugins and what kinda code am I looking at?

Thanks biggrin.gif
silverberry
For the "navigational" calendars, just replace the caption text $MTArchiveTitle$ above the calendar tags with:

CODE
<caption class="calendarhead"><MTArchivePrevious><a href="<$MTArchiveLink$>">«</a></MTArchivePrevious> <$MTArchiveTitle$> <MTArchiveNext><a href="<$MTArchiveLink$>">»</a></MTArchiveNext></caption>


That will make it look like ...

« Month Title »

the arrows on either side will navigate to the previous/next months date based monthly archive respectively.

--------------------------

I think there's a plugin that would do the second part for you ... but I can't pinpoint it! Maybe someone else will read this and know that part smile.gif
Josherace
putting the code in place of $MTArchiveTitle$ - that seems to affect the archives list and not the actual calendar...

I also tried that bit of code in the caption tag of the calendar and got this error:

Build error in template 'Main Index': Error in tag: You used an without a date context set up.

so I dunno....
arvind
You need to wrap the above code with tags as so:

CODE
<MTArchiveList archive_type="Monthly" lastn="1">
<caption class="calendarhead"><MTArchivePrevious><a href="<$MTArchiveLink$>">«</a></MTArchivePrevious> <$MTArchiveTitle$> <MTArchiveNext><a href="<$MTArchiveLink$>">»</a></MTArchiveNext></caption>
</MTArchiveList>
holiday
Thanks for the help.

What I'm looking at doing is have the prev and next links above the calender on my main page link to a page that looks the same as my index except that the entry will be the first of that month and the calender will of course be the relevant month. Clicking on a link day on the calender will load up that indiv archive page, relevant entry, same layout, same relevant calender month.

So what I'm thinking is that I need to change a template or add a template...

Any ideas?
sherzodr
Sorry for touching this dated topic, but I couldn't find answer to this question by searching the forums.

I've seen people doing it on their MT-powered sites very successfully, but when I decided to implement it, can't find any of those sites.

I was able to implement Monthly caledar Based archives only partially so far.
holiday
I believe it's the SomeDays plugin I was looking for. Or I could have the back/forward arrows just link to the exact URL of the 1st entry of the month.
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.