Extension:WEtheme
From WikiEducator
| LicenseByCategory Release status: experimental | |
|---|---|
| Implementation | Tag |
| Description | Allows adding custom CSS and/or JavaScript to a wiki page. |
| Author(s) | JimTittslerTalk |
| Last Version | 0.5.0 (2026-06-02) |
| MediaWiki | 1.15.5+ |
| License | MIT |
| Download | git [1] [2] |
What does this extension do?
The WEtheme extension allows OER Foundation partners to apply themes to selected pages in the wiki.
Usage
<wetheme p="partner_name" css="course.css" js="course.js" viewport="" ie="IE lte 9" header="header.html" />
(All parameters are optional except p.)
- p
- name of the partner institution
- css
- CSS filename within the partner directory (optional)
- js
- Javascript filename within the partner directory (optional)
- viewport
- viewport header
- header
- allows inserting an HTML fragment from the partner directory of the local filesystem directly in the page HEAD
Installation
1. Install the extension from git.
cd extensions git clone https://github.com/WikiEducator/WEtheme.git WEtheme cd WEtheme git checkout main
2. Add to your LocalSettings.php:
require_once( "$IP/extensions/WEtheme/WEtheme.php" ); # map from partner name to CSS/Javascript directory # can be local to the filesystem or remote (such as S3) $wgWEthemePartners = array( 'WikiEducator' => 'http://s.wikieducator.org/WikiEducator/', 'OERf' => '/extensions/WEtheme/t/OERf/', );