Help - Search - Members - Calendar
Full Version: Link to last entry on archive page
Movable Type Community Forum > Additional Resources > Tips and Tricks
marianil
Hi!

I've tried to search the forum and the manual but I find nothing... probably doing a bad job!  huh.gif

What I'm looking for is to put a link to my last entry in my archive pages.

For the moment I use this code:

CODE
<MTEntries lastn="1">
           <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
           </MTEntries>


And somehow this isn't working for me... I use "daily" as my archivetype.

And I'd also like the link to be without the #000...
I just want it to be: http://www.whatever.com/archvies/2003/03/28.php instead of http://www.whatever.com/archvies/2003/03/28.php#000203

Any idea?
girlie
What about it isn't working?

To eliminate the anchor (#000) in the link, try using <MTEntryLink archive_type="Daily"> instead of <MTEntryPermalink>.
marianil
Thanks for fixing th e #00... thing!  :)

What's not working is that on ever individual archivepage, I want a link to the last entry, but instead I just get a link to the existing entry that I'm already in.

So, let's say, the last entry is: http://www.whatever.com/archives/2003/04/02.php

and I'm at: http://www.whatever.com/archives/2003/04/01.php and want a link to the last, but I just get a link to http://www.whatever.com/archives/2003/04/01.php again...  ???
girlie
Oh - if you're using an MTEntries tag on the individual page, you're not going to get the results you want - that's because any MTEntries tag is overridden by the default behavior of that page (to show only one entry in particular).

If you want a link to the most recent entry on every individual page, you'd need to create a separate file for that code and include it in your other pages with SSI or PHP.
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.