[pmwiki-users] Creating GTD @Context by modifying !Category markup
5ko at free.fr
Sat Sep 8 13:22:25 CDT 2007
On Saturday 08 September 2007, Pico Ben-Amotz wrote:
> Markup('[[!','<links','/\[\[!([^\|\]] ?)\]\]/',
> "<span class='category'>[[$CategoryGroup/$1]]</span>")
> Can I just modify the markup above and the $CategoryGroup variable to
> change references from Category to Context and from "!" to "@" to
> create a new Context markup?
Just a remark while passing by. You should add your markup rules in config.php
instead of modifying the core distribution files, this will save you A LOT of
headaches on upgrades.
* To replace a rule, use the same 'id', that is the first argument in the
Markup() command; in the example, '[[!'.
* To add a new rule, use a non-existing 'id', like '[[@'.
> What if I wanted to take this a step
> further to eliminate the need to enclose the markup in brackets (that
> is, instead of using the current markup of [[!Subject]], I would like
> to be able to use a new markup of @Subject that would be rendered as a
> link to Context/Subject).
You can see the AtLinks recipe which may be what you need, or adapt it.
More information about the pmwiki-users