https://bugzilla.wikimedia.org/show_bug.cgi?id=34355

       Web browser: ---
             Bug #: 34355
           Summary: add a variable and parser function for the namespace
                    number
           Product: MediaWiki
           Version: 1.19-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Parser
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: umherirrender_de...@web.de
    Classification: Unclassified


The {{NAMESPACE}} variable always give the namespace text, but this text can
change, due to a configuration or localisation change. Having a way to get the
namespace number makes it possible to avoid a breaking of conditions or
transclusion by a change of a namespace.

Using {{NAMESPACE}} and {{ns:0}} inside a #ifeq does not have this problem, but
when using the {{NAMESPACE}} in transclusion of a page, you have this problem
or you have to use a big switch to map the name against the number, but getting
the number direct from MediaWiki sounds better.

Please add a {{NAMESPACENUMBER}} variable and also a parser function
{{NAMESPACENUMBER:pagename}} (like NAMESPACE).

Maybe call it NAMESPACEID, I am not sure, which is a better name.

Thanks.

-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to