Help - Search - Members - Calendar
Full Version: MT photoblog calendar
Movable Type Community Forum > Additional Resources > Tips and Tricks
Sue
How do I get only the last picture taken on a certain day to show up in my archives calendar? with a link to the all the pictures for that day?

http://x-o-x-o.com/archives/2004_01.php

thanks, guys smile.gif
LisaJill
try adding lastn="1" to your entries tag.

I'll be more explicit if you can post the entries portion of you template code. =)
kadyellebee
You might also have fun looking at the Photo Calendar tutorial. smile.gif

Kristine
Sue
thanks for your feedback! biggrin.gif
Tudy
I have a question about how to link to the calendar.. Currently I only have had success linking directly to my calendar archive The problem with this is every time the month changes I have to go thru my templates and change the date.. a pain. The calendar is located in my archive folder. What code would I use so that I don't need to do the update each month?
kristine
Tudy,

Are you using more than one Monthly Archive? You can look in the weblog config under archiving to find out.

If not, then you should be able to use
CODE
<MTArchiveList lastn="1" archive_type="Monthly"><a href="<$MTArchiveLink$>">Archives</a></MTArchiveList>

That will give you a link to the latest Monthly archive.

If you are using more than one Monthly archive, what are you using the for the Archive Filename on the Calendar Archives? The same tags in the Archive Filename can be used to link to that page.

Hope that helps,
Kristine
Tudy
Thanks Kristine..
I have under monthly archive 2 different archives. The calendar and the dated-based. Currently Im using the calendar.. I tired both codes you gave me but could get either one of them to work.

The tag in the archive calender file name might not be working because Im not sure how to insert it into my links.. heres an example of how its set up.

CODE
<li><a href="<$MTBlogURL$>reads.php">Reads</a></li>
kristine
Okay, so in the Weblog Config under Archiving, do you have any code next to Calendar's Archive File Template?

And is the radio button (little circle) in front of the Calendar Archive?

If you put the code I suggested anywhere in your template, where does that link go to?

Kristine
Tudy
the radio button is selected for the Calendar archive. I have this code next to the calendar date-based archive.

CODE
cal_<$MTArchiveDate formate="%y_%m"$>.php


when I put the above link in my link list like this.

CODE
<li><a href="cal_<$MTArchiveDate formate="%y_%m"$>.php">archives</a></li>


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


and it stops rebuilding..
Tudy
[IMG]http://www.eggsquizit.com/oui/images/archivescreenshot.jpg[/IMG]
kristine
Try this:
CODE
<li><a href="<MTArchiveList lastn="1" archive_type="Monthly">cal_<$MTArchiveDate formate="%y_%m"$>.php</MTArchiveList>">archives</a></li>


or just this:
CODE
<li><MTArchiveList lastn="1" archive_type="Monthly"><a href="<$MTArchiveLink$>">archives</a></MTArchiveList></li>


Those shouldn't cause a rebuild error because the MTArchiveList around it.

smile.gif
Kristine
Tudy
Thanks Christine. biggrin.gif
The first one sent me to this link
first coding sent me here..

But the second one works perfectly. YEA!

Your the bestest.
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.