[pmwiki-users] 'title' attribute of an HTML link

Patrick R. Michaud pmichaud at pobox.com
Wed Jan 11 10:44:37 CST 2006


I'm thinking about it a bit more, and I think that I can
get "title" to work as long as we restrict it to double-bracketed
links.  Thus

    [[some page "text"]]

would generate a link to SomePage with title="text" and displayed
as "some page" in the output.  But one would not be allowed to
add titles to bare WikiWord links.

Similarly, I think I might strip the space between a url and
its title, thus

    [[http://www.pmichaud.com/toast "Pop Tarts"]]

generates a link to SomePage with title="Pop Tarts" and displayed
as just the url (w/o the %20 as previously noticed).

Adding a title to a bare external link (no double-brackets)
would require that there be no space between the link and the
quotation mark.

Does anyone know if there's an issue with creating empty title=
attributes in links?  In other words, do browsers have an issue 
with something like:

    <a href='...' title=''>Here is a link</a>

Pm


On Wed, Jan 11, 2006 at 05:31:40PM +0100, Jean DEMARTINI wrote:
> Patrick,
> 
> Well, it is as I was suspecting. The problem is deeper than it can seem 
> at a first glance. I can be patient and use my 'dirty' method for a 
> while. The problem is not blocking as the need is essentially located in 
> the navigation side bar which will be easy to revampe.
> 
> JDem
> 
> Patrick R. Michaud a ?crit :
> 
> >On Wed, Jan 11, 2006 at 05:05:57PM +0100, Jean DEMARTINI wrote:
> >  
> >
> >>Patrick,
> >>
> >>I aggree with the fact that to introduce an attribute to define a title 
> >>attribute is not a very elegant method and I'm ready to abandonned it.
> >>
> >>I'have tried the method you propose. It functions quite properly with 
> >>external links. Then OK.
> >>
> >>But, I encountered a problem with internal links. Naively, I'have tried 
> >>the following code:
> >>
> >>$LinkPageSelfFmt = "<a class='selflink' href='\$LinkUrl' 
> >>title='\$LinkAlt'>\$LinkText</a>";
> >>$LinkPageExistsFmt = "<a class='wikilink' href='\$LinkUrl' 
> >>title='\$LinkAlt'>\$LinkText</a>";
> >>
> >>It does not function because $LinkAlt is not replaced by its value and 
> >>we see the string '\$LinkAlt' in the bubble. Things are not so simple. 
> >>Sight.
> >>    
> >>
> >
> >Yes, at the moment PmWiki doesn't recognize the title= attribute
> >for internal page links, only for external links.  I'll have to
> >think about that one a bit, the "..." syntax won't work very well
> >for page links.
> >
> >Pm
> >  
> >
> 
> 
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
> 




More information about the pmwiki-users mailing list