[Pmwiki-users] Link styles

Patrick R. Michaud pmichaud
Tue Sep 28 23:02:36 CDT 2004


On Tue, Sep 28, 2004 at 11:21:30AM -0400, Dawn Green wrote:
> Has the ability to affect wikilink styles eluded me or does it exist?  Right
> now, I need a way to change the font size of links within a page.
> 
> I have been unable to find info to change the font size for links or to effect
> size changes.  

Well, you can (and should) use stylesheets.  Basically there's the basic
<a ...> tag:

   a { color:blue; }       /* change all links to blue */

Of this, PmWiki also divides the links into different CSS-classes: 
   wikilink (link to an existing page)
   createlink (link to a non-existing page)
   urllink (link to a URL)

So, if you want to make all links to wikipages in green text, use

   .wikilink { color:green; }

> Also, I would like to see how I can define link styles for
> color, font, size, etc. that can be called as needed or be based on page
> divisions.  For example, I would like to define navigational links differently
> than page body or define within the text box a link style for all links that
> follow.  

And, of course, CSS lets you select items within page sections (assuming
you name your page sections using id='something').  The default PmWiki
template calls the left sidebar 'wikileft', so if you wanted to affect
just the links in the left sidebar, use:

   #wikileft a { color:red; }  /* change all links in the left sidebar */
   #wikileft a.wikilink { color:green; }  /* change wikilinks in left sidebar */

And, if this isn't enough, you can always set the configuration variables 
that PmWiki (1.0) uses to create links in the page:

   $UrlLinkFmt
   $WikiPageExistsFmt
   $WikiPageCreateFmt
   $UrlImgFmt

Pm



More information about the pmwiki-users mailing list