https://bugzilla.wikimedia.org/show_bug.cgi?id=31709
Web browser: ---
Bug #: 31709
Summary: parser template stack
Product: MediaWiki
Version: 1.17
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: Parser
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
As far as I can see, there isn't any stack keeping track which is the current
template/site the parser is processing right now (besides the main title
Parser::$mTitle of course).
I am not completely sure whether this could even be done with the current
parser layout, but I guess it could be done somehow within
Parser::braceSubstitution().
There are no hooks getting called at all yet I believe.
Knowing which template/site the code processed in various hooks is coming from
would be extremely helpful in a hand full of extensions I've been working on,
so this info should be publicly accessible from any Parser object.
For example, this would give parser functions the information which template
they are called from and would allow some {{THISPAGENAME}} variable. Just for
fun, I tried to implement this in MW 1.17 but it seems impossible with the
current structure (at least as real parser function, some '__PAGENAME__' thingy
would probably work).
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l