Page MenuHomePhabricator

Set ID attribute for body tag according to page title
Closed, ResolvedPublic

Description

Please add id attribute for body tag.

The id should:

  • be equal to the {{FULLPAGENAME}}
  • be coded as eg. anchors on pages: On page "ÁEÍOÚY" it would be encoded to

".C3.81E.C3.8DO.C3.9AY". But to keep the valid id some prefix should be added,
let's consider "wiki_", therefore the above example would finally be
"wiki_.C3.81E.C3.8DO.C3.9AY" which is valid id.

Usage of this feature:

  • mainly intended for utilization in CSS - referencing to certain page
  • secondary for robots which are checking the xhtml source instead of raw wiki

Thank you

Danny B.


Version: unspecified
Severity: enhancement

Details

Reference
bz6214

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:16 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz6214.
bzimport added a subscriber: Unknown Object (MLST).

Add-on:

The prefix might be also dynamically generated such as:
en.wikipedia_
cs.wikisource_
de.wikibooks_
or
wikipedia.en_
wikisource.cs_
wikibooks.de_
etc...

See also bug 6547 for related request

robchur wrote:

Page content div is wrapped in various CSS classes pertaining to the namespace
and title.