On 6/10/2011 8:52 PM, Petko Yotov wrote:
Agreed, but is there no reason why the two *have* to be the same.

They don't "have" to, but when we convert from simplified wiki-markup to HTML,
what PmWiki does is simple, quick and probably most convenient for most people
in most cases.


Is there a way to provide different text for the ALT and TITLE?

Not with the default PmWiki installation.

Looking at your demo page, the easiest fix for the double caption may be to
just disable one of the attributes, by adding such a line to config.php:

   $ImgTagFmt = "<img src='\$LinkUrl' title='\$LinkAlt' />"; # no alt
Another approach based on that idea might be something like:

$ImgTagFmt="<img src='\$LinkUrl' alt='\$LinkAlt' title='\$LinkText' />";

However, the caption isn't passed into the image handler function. Which is reasonable given it's not part of the image tag.


Looking at the Galleria documentation, I see that it is possible to get the
description from a text element after the image, eg. from the "| caption" part
generated by PmWiki. The method is shown here:

   http://galleria.aino.se/docs/1.2/references/data/#using-html-with-dataconfig

The example will not work in PmWiki without some tweaking, but it shouldn't be
hard.
Thanks, that seems like a workable solution, although I've not yet been able to find a selector that can get text after the BR.


Options for a more rigorous solution might be:
1] Since the caption is not currently part of the image it makes sense the caption is not passed as a parameter into the image parsing function. Is there a possibility to change this?

2] Or, allow for a separate definition of ALT and TITLE within markup. Possibly separate the title from alt with another pipe delimiter.

3] Allow for some form of styling to be put around image and table captions.

Option [3] is probably the more generally usable, with the creation of some form of $CationFmt variable. If this seems a reasonable approach, I'll add a PITS entry.


 ~ ~ Dave

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to