> ## Content Index
> Fetch the complete content index at: https://horrell.ca/llms.txt
> Use this file to discover other available public pages before exploring further.

# cwh_link_to_prev
- URL: https://horrell.ca/2007/08/13/cwh_link_to_prev/
- Published: 2007-08-13T02:51:37.000Z
- Updated: 2019-05-20T22:56:25.000Z
- Author: Christopher Horrell
- Tags: Textpattern, #Import 2024-10-01 02:36

`cwh_link_to_prev` is a Textpattern plugin that provides a replacement tag for `<txp:link_to_prev />` that includes a new *format* attribute which provides the ability to set the link format as a `link` tag suitable for placing in the `head` of any individual article page on your site. You can do this by setting the *format* attribute like so:

```
<txp:cwh_link_to_prev title="Previous" format="link" />

```

which will produce something similar to:

```
<link rel="prev" href="http://example.com/article/1/previous-post" title="Previous Post" />

```

Note that when used as a single tag without the *format* attribute specified:

```
<txp:cwh_link_to_prev />

```

it will produce a plain text link much in the same way as `<txp:link_to_prev />`:

```
http://example.com/article/1/previous-post

```

Finally, it can also be used as a container tag in the same manner as `<txp:link_to_prev />` if no *format* value is specified:

```
<txp:cwh_link_to_prev> ...Text or Tag... </txp:cwh_link_to_prev>

```

If you do specify a *link* value for the *format* attribute while used as a container tag, it will still produce a `link` tag.

This tag also shares all of the same attributes as `<txp:link_to_prev />`. For a complete list of applicable attributes, see [this Textbook entry](http://textbook.textpattern.net/wiki/index.php?title=Txp:link%5Fto%5Fprev&ref=horrell.ca).

For a further explanation of the benefits of using `link` tags for your site's navigation, please see “Day 9: Providing additional navigation aids” from Mark Pilgrim's [Dive Into Accessibility](https://github.com/nfreear/diveintoaccessibility?ref=horrell.ca).

You can download the plugin below:

[cwh\_link\_to\_prev](https://github.com/chorrell/cwh%5Flink%5Fto%5Fprev/archive/v.0.1.0.zip?ref=horrell.ca)