« display a list of links you've recently mentioned | Main | search templates that 'remember' »

creating footnotes with a list of URLs

When you're making a printable version of your blog pages, it's a good idea to list the URLs for all your hyperlinks. A neat way of doing this is to create footnotes to each link that list the URL.

I'm using the StripTags plugin for this, although since I set it up, the Collect plugin has come out, which has this functionality and much more.

If you do decide to use StripTags, here's the code:

Around the entry body:

<MTStripTags a="/ ([N])" collect="a" keep_tags="1"><$MTEntryBody regex="1"$></MTStripTags>

One of the problems with the StripTags plugin is that it strips all HTML unless you use the keep_tags attribute. Here I'm telling it to collect information from the <a> anchor tags and to add a footnote like (1) after each closing tag.

Then, where you want the footnotes to show up:

<MTIfStrippedTags tag="a">
<div >Footnotes</div>
<div ><MTStrippedTags tag="a"><$MTStrippedTagN$>wink <$MTStrippedTagAttr attr="href"$><br></MTStrippedTags></div>
</MTIfStrippedTags>

For each <a> tag that was collected, this outputs the appropriate URL from the href attribute.

About This Blog

  • Disclaimer: This is a personal site and is not connected with Six Apart, Ltd, the makers of Movable Type
  • Contact me:
  • Readme: What this blog is and is not
  • Reference: Templates for Al-Muhajabah's Islamic Blogs

August 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Tips by Type

Tips by Area

Other ways to read this blog

Feed Subscribe to this blog's feed
(default is RSS 2.0, I also have RSS 1.0 and Atom)

Text-only version
Powered by
Movable Type 3.2