[pmwiki-users] Link Formats and the title attribute.

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 9 13:09:41 CST 2005


On Wed, Nov 09, 2005 at 01:54:48PM -0500, Waylan Limberg wrote:
> > See http://www.pmwiki.org/wiki/Test/LinkTitles for
> > a demonstration.
> >
> Excellent! However, without it working for page links, it is of little
> use to me. And as far as that goes, the title of the page seems more
> practical. Why should I type the title in each time I link to the page
> when I have a page title anyway. (I'm using my EditTitle recipe which
> requires every page to have a title)

Oh.  Why not use or modify the Cookbook.TitledLinks recipe
to do what you want?

> Although, I have noticed that the title does not come through on all
> links only some (the others get the page name), and I can't seem to
> identify any consistent pattern to narrow down the cause. For an
> example see this page: http://warrenforestcourt.org/Rules/Rules.

Well, determining a page's title requires reading the page file,
and reading the page file every time there's a link to the page
can become a somewhat expensive proposition on some sites---especially
if they aren't making a whole lot of use of titles (as many of us
are not).

Whenever PmWiki reads a page it caches certain attributes such 
as the title and permissions so it won't have to re-read that
information later, and when asked to display a $Title for a page
it uses the (:title:) if it's cached it already and the page name
if it hasn't.  

I can probably provide an option to get LinkPage to always
read and cache the target's page information, at some
cost in performance.  Then $Title would always work for
page links.  Or, if you want $Title to work everywhere
regardless of where it might happen to be used, I can give
you a customization that will do that (and it could potentially
be very expensive for page rendering).

Pm




More information about the pmwiki-users mailing list