[pmwiki-users] Getting the list of all anchors in a page ?
ABClf
languefrancaise at gmail.com
Mon Jul 19 17:22:28 CDT 2010
Hello Petko !
I'm testing your markup code and can't make it work now.
In page where I use (:listanchor:) I get an error message related to regexp :
Warning: array_keys() [function.array-keys]: The first argument should
be an array in /homepages/18/d269604285/htdocs/docs/pmwiki.php(1543) :
regexp code on line 1
Warning: implode() [function.implode]: Invalid arguments passed in
/homepages/18/d269604285/htdocs/docs/pmwiki.php(1543) : regexp code on
line 1
Can be seen there : http://www.languefrancaise.net/Test/Ancres
In my config :
Markup('listanchor', '>[[#', '/\\(:listanchor:\\)/e',
'implode(" ; ", array_keys($GLOBALS["SeenAnchor"]))' );
Thank you for your attention.
Gilles.
2010/7/18 Petko Yotov <5ko at 5ko.fr>:
> On Thursday 15 July 2010 18:35:19, ABClf wrote :
>> In my case, I have a page with some anchors well named ; and I would
>> find convenient to use something as (:listanchor:) to get a basic list
>> (I would like an horizontal format : word1 ; word2 ; word3) instead of
>> doing the list by hand.
>>
>> [[#word1]]
>> ...
>> [[#word2]]
>> ...
>> [[#word3]]
>
> You can add a markup definition :
>
> Markup('listanchor', '>[[#', '/\\(:listanchor:\\)/e',
> 'implode(" ; ", array_keys($GLOBALS["SeenAnchor"]))' );
>
> Thanks,
> 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