Last modified: 2009-04-30 01:48:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11240, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9240 - parser function to query the name of enclosing sections: {{#section-name:<section level>}}
parser function to query the name of enclosing sections: {{#section-name:<sec...
Status: RESOLVED DUPLICATE of bug 1605
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-09 17:10 UTC by Bernhard Fastenrath
Modified: 2009-04-30 01:48 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bernhard Fastenrath 2007-03-09 17:10:11 UTC
A parser function to query the name of enclosing sections
like {{#section-name:<section level>}}
would allow a template to make references to the talk page or to create new
sections on other pages depending on the name of the enclosing section (assuming
the functionality requested in Bug #Bug 9239)
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-09 19:16:16 UTC
Kind of tricky to implement at present, due to the way we store sections.  In particular, parser-
hook functions of any sort don't have access to the rendered section titles, due to the multipass 
parser.  Such a function would have to be treated specially somehow, like add some kind of dummy 
unique tag that could be replaced in a later pass.  (And, of course, recursion would probably 
have to be special-cased, e.g., ==Foo{{sectionname}}bar== would probably need to be treated as 
literal.)
Comment 2 Bernhard Fastenrath 2007-03-09 19:42:06 UTC
You gave the answer yourself. Make it the section name as present in the input,
with no translations applied.
You could, of course, offer another parser function capable to apply the
required translations ;-)
Nicely bizarre.
Comment 3 Dan Jacobson 2009-04-30 01:48:57 UTC

*** This bug has been marked as a duplicate of bug 1605 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links