[pmwiki-users] Actions and Anchors?

Martin Cuno martin.cuno at posteo.de
Mon Nov 18 02:50:23 PST 2024


Hello technicians!

Once again I have a very specific request - but it could be interesting for others too:

I use PmWiki (among other things) intensively for a literary-philological matter. The legacy of an author is entered as text. I have created a series of my own markups, e.g. for comments, crossed-out text, handwriting, questionable passages, etc.

For example, "additional text" is entered with {1{ blabla }1}. The markup rule is accordingly:

Markup('zusatz','inline','/\\{1\\{(.*?)\\}1\\}/','<span style="color:green">$1</span>');

The text then appears green.

I have created my own "$action" in case I want to hide these markups. CSS is not enough for this, among other things because some markups contain internal information that must not be visible in the source code in the browser.

SDV($HandleActions['lgcsimpel1'], 'Simpel1');
function Simpel1($pagename, $auth=read){
HandleBrowse($pagename);
}

Then I can use "if" to turn off the markups, e.g.:

if($action=="lgcsimpel1") {
Markup('zusatz','inline','/\\{1\\{(.*?)\\}1\\}/','$1');
..
}

All of this is just background, it works well. But now comes my question:

When I'm working, I often find myself at a certain point in the text, namely on an anchor, like ...?n=Fz.Fz146#A7815

I would like to be able to return to this point in the text when I switch on the "simplified view"!

Two problems:

a) Such an $action doesn't seem to work when it is attached to an anchor (n=Fz.Fz146#A7815?action=lgcsimpel1)? Is that the case, and can't it be changed?

b) How can I incorporate a certain anchor into a new link target if I'm on it?

Thank you very much for your help!

Best regards!

Martin, Siegen, Germany


-- 
Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft.
www.avast.com



More information about the pmwiki-users mailing list