[pmwiki-devel] Wiki links with title/alt text attribute
Petko Yotov
5ko at 5ko.fr
Thu May 5 06:42:15 CDT 2011
On Wednesday 04 May 2011 22:56:51, John Rankin wrote :
> For completeness, the local customisation to let LinkPage take advantage
> of the $alt text that
> MakeLink sets was equally easy. Perhaps this feature could move into the
> core at some point.
> The changes to pmwiki.php are:
>
> - add '$LinkAlt' and $alt to the str_replace arrays at the penultimate
> line of function LinkPage
>
> - change $LinkPageExistsFmt and $LinkPageCreateFmt
>
> At the moment, I am using a custom LinkPage function. So far, this has
> not had any side-effects
> that I can detect.
>
> Technically, the change is simple. The question is whether the markup is
> suitable.
>
> [[page name"alt text" | link text]] and [[link text -> page name"alt
> text"]] look and feel acceptable to me.
In the past, there have been discussions about link titles and the preferred
format was [[link | text | title ]]. It is written on the roadmap.
Alternatively, there is a LinkTitles recipe that uses [[link | text (title)]]
and hides the thing in parentheses much like the regular [[page (link)]] does.
The external link titles feature [[http://link"title"|text]] always existed
but was initially hidden because the $UrlLinkFmt didn't have the attribute
title='\$LinkAlt'. It was for a long time documented how to enable it, and it
is now enabled.
The image alt/title text always existed like http://site/image.jpg"alt" or
Attach:im.jpg"alt".
That's why I said Monday, I don't know yet if and how the [[internal link
"with quotes"]] should or shouldn't be changed in the core.
Petko
More information about the pmwiki-devel
mailing list