[pmwiki-users] Creating GTD @Context by modifying !Category markup

Pico Ben-Amotz pmwiki at ben-amotz.com
Sat Sep 8 11:44:26 CDT 2007


On 9/8/07, Mike Shanley <up at upisup.com> wrote:
>
>
> Pico Ben-Amotz wrote:
> > What would it take to modify the markup for Categories to work with a
> > different group name (Context, instead of Category)
> In config.php, write this:
> $CategoryGroup = 'Context';
>
Yup, that works fine.  Thanks
>
> >  and different
> > markup (an At sign instead of a Bang or  Exclamation point)?
> >
> In config.php, write this:
>
> Markup('[[!','<links','/\[\[@([^\|\]] ?)\]\]/',
>   "<span class='category'>[[$CategoryGroup/$1]]</span>");
>
Nope, that seems to break the markup.  It results in links that point
to the current group and cause the initial character to be displayed
in the link.  Also, shouldn't the initial string be [[@ instead of [[!
 Either way, the result is the same, the resulting link displays the
initial character and the link points to the current group.

> > 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).
> >
> In config.php, write this (I THINK!!!):
>
> Markup('@','<links','/@([^\|\]] ?)\s/',
>   "<span class='category'>[[$CategoryGroup/$1]]</span> ");
>
Nope, that doesn't seem to work.
>
> It seems like you're the type of person who likes shortcuts... So you
> might like my ShortCutsMarkup recipe...
> http://pmwiki.org/wiki/Cookbook/ShortCutsMarkup
>

Very nice, thank you.  I will check that out.

Pico



More information about the pmwiki-users mailing list