Skip to content

Instantly share code, notes, and snippets.

View schplurtz's full-sized avatar

Schplurtz le Déboulonné schplurtz

  • France
View GitHub Profile
@schplurtz
schplurtz / pageclass.php
Created October 12, 2018 10:10
function to add CSS classname to DW pages baed on namespace, pagename, and namespace depth
/**
* compute a list of css class depending on $ID. there are
* CSS class depending on the pagename, the full pagename,
* the namespace and the full namespace, and the
* namespace tree level (root namespace is 0)
*
* Those classnames are meant to be used with 'userstyle.css'
* It would then be easy to create CSS for all start page.
* or all pages in the :archive namespace could have a special
* color.