Forum:Templates and Skins

We use templates to lay out and format pages. Among other things, we can preformat tables with eg. text and background colours. But these colours can be wonderful with the default skin and terrible with other skins.

My question is: is there some way to use the (user's) skin as a parameter in a template (so as to use different code based on the skin?)

TIA

--Lirielle 03:02, 25 May 2007 (UTC)


 * There's no Magic Word for that, and adding it wouldn't be to well, the page would need to be re-parsed every time someone switched their skins. For that matter, since skin value isn't part of the cache the page would be re-parsed every time a different skin was used. So if someone was using monobook first it would be parsed, then if they switched to slate it would be parsed again, and if a new user came along with monobook it would be parsed again, and then if that first user refreshed the page would be parsed yet again. When it only needed to be parsed on the first time. But JS knows the current skin, and if something looks off in a skin you can always use classes and id's instead of style tags then use Common.css to define the looks, and use the individual Skin.css pages to customize the colors per skin to look the best. ~Dantman(talk) tricks May 25, 2007 @ 03:14 (UTC)


 * OK, that makes sense. Thanks. --Lirielle 07:13, 25 May 2007 (UTC)