[pmwiki-users] Getting the list of all anchors in a page ?

ABClf languefrancaise at gmail.com
Mon Jul 19 19:12:27 CDT 2010

Right indeed ;)
The markup does work but not the way I was expecting it to work.
No problem, this was a very marginal question for lazy webmaster.

Thank you for your help Petko.

2010/7/20 Petko Yotov <5ko at 5ko.fr>:
> On Tuesday 20 July 2010 00:22:28, ABClf wrote :
>> I'm testing your markup code and can't make it work now.
>> In page where I use (:listanchor:) I get an error message
> Right, the directive only displays anchors that exist earlier in the page, so
> there is an error when there is no anchor before it. We can deal with empty
> lists without issuing error messages :
>  Markup('listanchor', '>[[#', '/\\(:listanchors:\\)/e',
>    '(isset($GLOBALS["SeenAnchor"])?
>      implode(" ; ", array_keys($GLOBALS["SeenAnchor"])) : "")');
> The $SeenAnchor array contains all anchors that PmWiki has encountered in the
> page untill that moment when we read it in order to display the list.
> Unfortunately, I don't have an easy way to display anchors that have not yet
> been seen by PmWiki. :-)
> Petko

| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com

More information about the pmwiki-users mailing list