Help - Search - Members - Calendar
Full Version: Changing archive links
Movable Type Community Forum > Additional Resources > Tips and Tricks
Gabe
Hi, with my site I have individual archive pages for each day I post.  So, for my site to reach the entry on Sept 13, 2002 you would click on the appropiate link which would point to:

http://mysite.com/archives/2002-09-13/index.php

But I want the link to point to:

http://mysite.com/archives/2002-09-13/

Where can I do this in MT 2.21?

Thanks in advance.
kadyellebee
Do you already have Archive Filenames set up for this?  That's under Blog Config in the Archiving section.

Well, unless you have an index.html file in the 2002-09-13 folder, those links would both point to the same thing.  I suppose if you just don't want it to show the index.php filename, you could hard-code in the links like this:
CODE
<$MTBlogArchiveURL$><$MTEntryDate format="%Y-%m-%d"$>/

But then if you decide to change where your archives are, you'll have to change your link code instead of having it just automatically know with MTEntryLink.

Hope that helps,
Kristine
Gabe
Yeah, I tried that before.  But I get this error:
-------------------------------------------------
Renaming tempfile '/home/shana/public_html/gabe/archives/http://gabe.shanafelt.net/archives/2002-09-14/.new' failed: Renaming '/home/shana/public_html/gabe/archives/http://gabe.shanafelt.net/archives/2002-09-14/.new' to '/home/shana/public_html/gabe/archives/http://gabe.shanafelt.net/archives/2002-09-14/' failed: Not a directory  
---------------------------------------------------
I guess the tag needs a file name like index.php or index.html afterwards.  I know this can be done as I have seen it on other sites like http://a.lifeuncommon.org
kadyellebee
What did you do that got that error?

If you got that when trying to use archive filenames, you'll want to use a different format - like this:
for daily archiving -
CODE
<$MTArchiveDate format="%Y-%m-%d"$>/index.php


and then you can link to that from your Main Index archive with the code I posted in the previous post:
CODE
<$MTBlogArchiveURL$><$MTEntryDate format="%Y-%m-%d"$>/


Kristine
Gabe
Thanks, I got it working now.  You can see the results at http://gabe.shanafelt.net/

I also wanted the archived months to show as folders too so I just reused:

<$MTBlogArchiveURL$><$MTEntryDate format="%Y-%m-%d"$>/

Thanks,  :)
kadyellebee
Glad that helped you!! smile.gif
Kristine
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.