Last modified: 2011-03-13 18:05:58 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 T4296, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2296 - Please create {{PAGENAME}}-type variable for FALSE namespaces
Please create {{PAGENAME}}-type variable for FALSE namespaces
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
PC Linux
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-06-02 18:31 UTC by Kellen
Modified: 2011-03-13 18:05 UTC (History)
0 users

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


Description Kellen 2005-06-02 18:31:31 UTC
On wikibooks, we're in need a of a variable similar to {{PAGENAME}} for false

On the Cookbook, we're using "Cookbook:" as a false namespace. We have set up a
template [ Template:Recipe] to
include on each recipe page which will add a small bit of navigation and, more
importantly, include each recipe in a category (so we can have an easily
maintainable recipe index), specifically
[ Category:Recipe]. Our template
currently uses [[Category:Recipe|{{PAGENAME}}]] to achieve this, but since each
page is prefixed by "Cookbook:", everything is indexed under "C". I realize we
could use {{1}} to pass in a value, but we're trying to avoid having to edit the
sort key for every page every time, so a variable which returns only the page
name after the false namespace would be invaluable.

There is a bug request [ here]
which requests a "Cookbook:" be a proper namespace, which would alleviate this
particular occurrence of the problem, but it might resurface if we include false
namespaces under a proper "Cookbook:" namespace, e.g. with
Comment 1 Erik Moeller 2005-06-02 22:14:20 UTC
Pseudo-namespaces should not be used in the first place, so I'm inclined to mark
this WONTFIX and work on a better solution instead. I strongly advise not to
create a "Recipe" pseudo-namespace within a pseudo-namespace, and to use
categories instead for that purpose.

MediaWiki 1.5, which should go live within weeks, will have two changes that are
important to you:
- number of real namespaces will no longer be limited to 128
- new database schema makes changes to page titles easier

The second is important because it allows us to relatively trivially convert the
existing "Cookbook:" pages into a real namespace. I'd be willing to do this once
we've switched to 1.5 (someone else might do it before then). I'd ask you to be
patient until this point.
Comment 2 Kellen 2005-06-03 05:44:16 UTC
I've stuck pretty much to my corner of wikibooks thus far so I don't think I'm
familiar with the reasons why pseudo/false namespaces should not be used.

For our indexes in the Cookbook I thought (though others have disagreed with me)
that having namespace-enabled categories would be a relatively elegant way to
deal with organization (specifically to encode the meaning of a category). e.g.:
# Category:Cookbook
# Category:Cookbook:Recipe
# Category:Cookbook:Recipe:Breakfast
# Category:Cookbook:Recipe:Cuisine:African
# Category:Cookbook:Recipe:Cuisine:Caribbean

Perhaps if we have unlimited namespaces this is no longer an issue.
Comment 3 Rowan Collins [IMSoP] 2005-06-05 15:56:13 UTC
See also
(and its replies), which describes that in a future version (perhaps 1.6.x)
namespace management will be exposed through the web interface, so it will no
longer be necessary to rely on developers to make appropriate changes like
putting Wikibooks projects into namespaces.

As for why pseudo-namespaces are a bad idea, it's precisely because they lead to
this kind of request - there's no point reinventing all the features of
namespaces in order to apply them to naming schemes that look like namespaces
but aren't. Or, to put it another way, every advantage of having namespaces
built in to the code (and indeed the database structure) is a disadvantage of
using "false" namespaces instead.

As for something like "Cookbook:Recipe:", that's taking namespaces to a whole
new level, and I wonder if it wouldn't be better just to use categories for that

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