Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-02 08:10:11

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

jmd_ref: Permlink+anchor

Download 0.1

This plugin is essentially <txp:permlink/> + anchor links. Since, ^"foo":<txp:permlink id="1"/>#foo^ doesn’t work in Textile, you can use <txp:jmd_ref ref="1" hash="#foo">foo</txp:jmd_ref>.

Attributes

Attribute Available values Default value Description
ref INT The ID of the reference article.
hash

#r+hash An anchor on ref. If a hash mark (#) is not used, the plugin assumes the anchor is #r+hash (e.g. hash="40" = #r40)
sup 1, 0 1 Superscript

Examples

  • <txp:jmd_ref ref="1" hash="#comment"/>
    • Output: <sup><a href="<txp:permlink id="1"/>#comment">#comment</a></sup>
  • <txp:jmd_ref ref="1" hash="#comment" sup="0">Comment</txp:jmd_ref>
    • Output: <a href="<txp:permlink id="1"/>#comment">Comment</a></sup>
  • <txp:jmd_ref ref="1" hash="33"/>
    • Output: <sup><a href="<txp:permlink id="1"/>#r33">33</a></sup>

Last edited by jm (2008-03-31 08:35:04)

Offline

Board footer

Powered by FluxBB