Help - Search - Members - Calendar
Full Version: "Dirify"ing named anchors
Movable Type Community Forum > Additional Resources > Tips and Tricks
robdumas
I've seen a lot of interesting articles on how to use the "dirify" attribute to generate great, accessible archive entries (i.e., "/archives/Jun/03/entry_title.html"), but I use monthly archives. Here's what I want to do: a link to a typical posting in my archives goes "/archives/2003_06.php#000133". I want to change that to "/archives/2003_06.php#entry_title". This, I feel, allows my archived entries to be accessible, without forcing me to use individual archives. Does anyone have any idea how I'd do this?
kadyellebee
In your date-based archive template, look for
CODE
<a name="<$MTEntryID pad="1"$>"></a>

and change it to
CODE
<a name="<$MTEntryTitle dirify="1"$>"></a>


Then in your Main Index template, I think this will work
CODE
<a href="<$MTEntryLink$>#<$MTEntryTitle dirify="1"$>">Permalink</a>


Kristine
robdumas
Thanks a bunch!
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.