Oh yeah! I totally forgot about using selectors! (i had to stop using them for awhile because I had to create compatible CSS code for our IE5 and 6 systems :P anywho ...) However, for my current project, I actually need to assign classes as I will be having some JS code that will be looking for links based on their class.
Reason for this, we are going to try to have 2 "modes" for our wiki... one mode is the "normal" mode that is just like any other wiki and the second mode is going to be an "enhanced" or a web2.0-ish mode (an experimental wiki project that will also include an AdobeAIR application). Long story short, links with certain classes will have special attributes added to the tag and their url changed.
If it comes down to it, I guess I can search and replace all <a/> tags using RegEx to determine the URL and apply the changes that way. :)
Walter Mazza
On Thu, Mar 26, 2009 at 4:37 PM, Platonides Platonides@gmail.com wrote:
Walter Mazza wrote:
I can't seem to find (or maybe not looking in the right places!) if it is possible to assign a CSS class to links that point to pages to a specific namespace, similar to how external links are given the CSS class of "externa". is it possible via extensions or editing something like LocalSettings.php?
for example: if I create an interwiki link from the main namespace to
lets
say the "community" namespace (wiki: [[Community:Main]]), I want those
links
to have a CSS class of "link-ns100"
any pointers would be greatly appreciated. :)
Walter Mazza
CSS have selectors based on the attributes. So you can filter based on how the url start, ie. the namespace :)
a[href^="/wiki/Talk:"] { color: green; }
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l