[pmwiki-devel] Wiki links with title/alt text attribute
John Rankin
john.rankin at affinity.co.nz
Sun May 1 19:57:58 CDT 2011
I am assessing the following link markup as a local customisation:
# [[A Maori Village"A Maori Village ¶ The Tapu on Crops ¶
Maori Art" |A Ramble Ashore]]
# [[Victorious Warriors"Victorious Warriors ¶ Treatment of
Prisoners ¶ Baked Heads"|+]]
# [[Kororareka"Kororareka ¶ A Mixed Community ¶ Shulitea
(King George)"]]
This is part of a book production system and addresses the case where
entries in the table of contents are different from the chapter titles.
In the above examples, the alt text becomes the contents entry, the link
text becomes the chapter title.
The MakeLink function treats the quoted text as alt text, so it was a
simple matter to use this in a local link page exists variable. The
problem is that the MakePageName function (e.g. used in ReadTrail)
produces inappropriate page names.
What is the best (least worst?) solution:
- change the $PageNamePatterns array so quoted text is removed before
the page name is derived
- patch trails.php to remove any quoted text before calling MakePageName
- use a different markup
From recent experience, the markup works well under a range of page
naming conditions [1] and it seems consistent with alt text on images
and external links. I have temporarily patched trails.php to get
something working, but am planning to redefine $PageNamePatterns.
Is there another or better way to do this? Are there any traps into
which this might fall? TIA
JR
[1] There is a test book under development at
http://juxtr.net/books/NineMonthsInNewZealand/HomePage where the markup
is in use.
--
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
M 021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz
More information about the pmwiki-devel
mailing list