[pmwiki-users] Assign id to link?

Dominique Faure dominique.faure at gmail.com
Sat Aug 25 16:42:32 CDT 2007


On 8/25/07, Ryan R. Varick <rvarick at gmail.com> wrote:
> Is it possible to assign a specific id to a link?  I am working on a
> template component that acts somewhat like a GroupHeader, and one of
> the links needs a specific css id.  The best I can do so far is get
> PmWiki to stick a span around my link:
>
> %myCssId apply=block%[[LinkGoesHere]]
>
> produces
>
> <span id="myCssId"><a href="?n=LinkGoesHere">LinkGoesHere</a></span>
>
> Is there a way to get that id onto the link itself?  I cannot for the
> life of my figure out how to do it.
>

Add the line below to your local configuration file:

  $WikiStyleApply['link'] = 'a';

Then, you may use following markup to get the expected result:

  %id=myCssId apply=link%[[LinkGoesHere]]

--
Dominique



More information about the pmwiki-users mailing list