Template talk:PrefixIndex
Usage
editThis template transcludes Special:PrefixIndex (yes, you can do that!) along with some extra stuff, to produce a list of pages with names beginning with a certain prefix. Enter the prefix in the first unnamed parameter. To split the list into multiple columns, enter the column width (e.g. 15em, or 30em) in the |colwidth=
parameter. To hide redirects from the list, enter anything in the |redr=
parameter and to strip the given prefix from all the page names, enter anything |stripprefix=
parameter.
You can do most of this stuff (except for the |columns=
and |colwidth=
part) by directly transcluding the special page. Its documentation and talk can be seen at the (bizarrely located due to technical reasons) pages Wikipedia:Special:PrefixIndex and Wikipedia talk:Special:PrefixIndex.
Like, for example: {{Special:PrefixIndex/Dogs of|stripprefix=1|hideredirects=1}}
The main thing this template adds is the ability to specify columns and column width.
Compare this to the equivalent usage with {{PrefixIndex}}:
Like, for example: {{PrefixIndex|Dogs of|stripprefix=1|hideredirects=1|colwidth=12em}}
Syntax
editVertical format that takes up a lot of space and is easy to read:
{{PrefixIndex | prefix = | stripprefix = | hideredirects = | colwidth = }}
Horizontal format:
{{PrefixIndex||stripprefix=|hideredirects=|colwidth=}}
Parameters
edit{{{1}}}
or{{{prefix}}}
– (REQUIRED) — prefix to list/search from − defaults to the current page that the template is transcluded from{{{colwidth}}}
– (OPTIONAL) — width of columns to use, in em units, e.g. "30em".{{{redr}}}
or{{{hideredirects}}}
– (OPTIONAL) — if set, does not display redirects{{{stripprefix}}}
– (OPTIONAL) — if set, strip the prefix value from displayed list items
See also
edit- Special:PrefixIndex
- Wikipedia:Special:PrefixIndex
- Wikipedia talk:Special:PrefixIndex
- {{Look from}} to create a link to a list of all page names which begin with a given word or words
- {{In title}} to create a link to a list of all page names which contain a given word or words
![]() | This template has not been added to any categories. Please help out by adding categories to it so that it can be listed with similar templates. |
Requested move 18 June 2015
edit- The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section.
The result of the move request was: moved. Jenks24 (talk) 02:52, 6 July 2015 (UTC)
Draft:PrefixIndexListed → Template:PrefixIndex
- Draft:PrefixIndexListed/doc → Template:PrefixIndex/doc
- Draft:PrefixIndexListed/sandbox → Template:PrefixIndex/sandbox
- Draft:PrefixIndexListed/testcases → Template:PrefixIndex/testcases
– New template with better functionality (explained at WP:VPT#Draft:PrefixIndexListed). – 103.6.158.193 (talk) 18:15, 18 June 2015 (UTC)
- This is a contested technical request (permalink). EdJohnston (talk) 19:30, 18 June 2015 (UTC)
- Comment: I don't see that the new template has been reviewed by anyone except the creator, User:103.6.158.193. Other views are welcome. We should at least try to get someone familiar with Special:Prefixindex to take a look. While the IP did post at WP:VPT#Draft:PrefixIndexListed as yet there have been no responses there. EdJohnston (talk) 19:30, 18 June 2015 (UTC)
- Strong support. This is way too cool, IP whoever you are. Very elegant implementation. I've got no concerns with moving this to template space. Wbm1058 (talk) 21:38, 18 June 2015 (UTC)
- Comment doesn't this just wrap Special:PrefixIndex into {{div col}} ? Though I do see the advantage of bullet points; but I'm not seeing columns being produced, when you add bullet points, unlike the straight output from SpecialPrefixIndex (do I need JS turned on?) Why don't you use the |column feature on Special:PrefixIndex? -- 70.51.203.69 (talk) 06:49, 19 June 2015 (UTC)
- Thanks for creating the documentation. I was not aware that the |columns= param could be used within {{Special:PrefixIndex}}. (How did you known that?) Since we don't have any help page for PrefixIndex, most users aren't aware of that either which makes it worth having this as a template. Templates can have documentation pages whereas the original markup doesn't have any. (If you have time, consider starting the page Help:PrefixIndex.) 103.6.158.193 (talk) 07:51, 19 June 2015 (UTC)
- Good points here. I see that
<ul class="listify">
is the magic that adds the bullets. The idea of transcluding something in "special" namespace, like {{Special:PrefixIndex}} is brilliant. I hadn't thought of that. Seems that the WMF "documents" this at Wikipedia talk:Special:PrefixIndex: {{Special:Diff/578487437}} Special:Diff/578487437 – Hey, why isn't that transcluding? Is there a list anywhere of specials that transclude? Wbm1058 (talk) 13:11, 19 June 2015 (UTC)- A number of special pages can be transcluded whereas a number of them can't be. A few in the former category include Special:AllPages, Special:WhatLinksHere, Special:RecentChanges, Special:NewPages and even Special:Contributions (wow, that can be used for very real stalking on others!). It is through the transclusions of PrefixIndex that backlog pages such as WP:Requested moves/Old AFC submissions and WP:Requested moves/Misplaced XfDs are built. On the other hand, Special:History, Special:Diff and others can't be transcluded. They just show up as links if you try to transclude them. But actually, I think it is inappropriate to call these "transclusions" at all, since these "transclusions" can't be expanded through Special:ExpandTemplates. 103.6.158.193 (talk) 15:06, 19 June 2015 (UTC)
- Thanks. I see information also at Wikipedia:Transclusion § Special pages. Wbm1058 (talk) 20:06, 20 June 2015 (UTC)
- A number of special pages can be transcluded whereas a number of them can't be. A few in the former category include Special:AllPages, Special:WhatLinksHere, Special:RecentChanges, Special:NewPages and even Special:Contributions (wow, that can be used for very real stalking on others!). It is through the transclusions of PrefixIndex that backlog pages such as WP:Requested moves/Old AFC submissions and WP:Requested moves/Misplaced XfDs are built. On the other hand, Special:History, Special:Diff and others can't be transcluded. They just show up as links if you try to transclude them. But actually, I think it is inappropriate to call these "transclusions" at all, since these "transclusions" can't be expanded through Special:ExpandTemplates. 103.6.158.193 (talk) 15:06, 19 June 2015 (UTC)
- Good points here. I see that
- Thanks for creating the documentation. I was not aware that the |columns= param could be used within {{Special:PrefixIndex}}. (How did you known that?) Since we don't have any help page for PrefixIndex, most users aren't aware of that either which makes it worth having this as a template. Templates can have documentation pages whereas the original markup doesn't have any. (If you have time, consider starting the page Help:PrefixIndex.) 103.6.158.193 (talk) 07:51, 19 June 2015 (UTC)
- OK, Special:PrefixIndex has a columns parameter, but per the {{div col}} documentation, defining a specific number of columns is deprecated. Wrapping in {{div col}} lets us specify the column width, which produces a variable number of columns depending on the reader's screen size. Wbm1058 (talk) 13:43, 19 June 2015 (UTC)
- Just noticed another difference. {{div col}} sorts vertically down column 1, then column 2, etc. The special sorts horizontally. Wbm1058 (talk) 13:57, 19 June 2015 (UTC)
- The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.
Testing
edit{{Look from|Brand New}}
{{Draft:PrefixIndexListed|Brand New|columns=5}}
- Brand New
- Brand New-U
- Brand New/Modest Mouse Tour
- Brand New (Ben Rector album)
- Brand New (Ben Rector song)
- Brand New (EP)
- Brand New (Gary Stewart album)
- Brand New (Kevin Simm album)
- Brand New (Rhymefest song)
- Brand New (Salt-n-Pepa album)
- Brand New (Shinhwa album)
- Brand New (Sista song)
- Brand New (Tyga, YG and Lil Wayne song)
- Brand New (band)
- Brand New / Safety in Numbers
- Brand New Age
- Brand New Bein'
- Brand New Bitch
- Brand New Cadillac
- Brand New Cherry Flavor
- Brand New Congress
- Brand New Couch
- Brand New Dance
- Brand New Dance (song)
- Brand New Day
- Brand New Day (Agents of S.H.I.E.L.D.)
- Brand New Day (Blood, Sweat & Tears album)
- Brand New Day (Eddie Money album)
- Brand New Day (Kodaline song)
- Brand New Day (Massari song)
- Brand New Day (Ricki-Lee Coulter album)
- Brand New Day (Sting album)
- Brand New Day (Sting song)
- Brand New Day (Swollen Members album)
- Brand New Day (The Mavericks album)
- Brand New Day (The Watchmen album)
- Brand New Day (Van Morrison song)
- Brand New Era
- Brand New Eyes
- Brand New Eyes World Tour
- Brand New Friend
- Brand New Girlfriend
- Brand New Girlfriend (song)
- Brand New History
- Brand New Hong Kong
- Brand New Immortals
- Brand New Key
- Brand New Knife
- Brand New Life
- Brand New Love
- Brand New Love (album)
- Brand New Love (disambiguation)
- Brand New Love Affair
- Brand New Love Affair (EP)
- Brand New Love Affair (song)
- Brand New Lover
- Brand New Machine
- Brand New Maid
- Brand New Man
- Brand New Man (song)
- Brand New Me
- Brand New Me (Alicia Keys song)
- Brand New Me (Dusty Springfield song)
- Brand New Me (EP)
- Brand New Me (John Michael Montgomery album)
- Brand New Morning
- Brand New Morning (Bob Seger album)
- Brand New Morning (Magnum album)
- Brand New Morning / Jealousy Jealousy
- Brand New Music
- Brand New Parade
- Brand New Planet
- Brand New School
- Brand New Second Hand
- Brand New Sin
- Brand New Strings
- Brand New Sun
- Brand New Theatre
- Brand New Unit
- Brand New War
- Brand New World
- Brand New World (EP)
- Brand New Year
- Brand New by Tomorrow
- Brand New discography
{{Draft:PrefixIndexListed|Brand New|colwidth=24em|redr=n}}
- Brand New
- Brand New-U
- Brand New/Modest Mouse Tour
- Brand New (Ben Rector album)
- Brand New (Ben Rector song)
- Brand New (EP)
- Brand New (Gary Stewart album)
- Brand New (Kevin Simm album)
- Brand New (Rhymefest song)
- Brand New (Salt-n-Pepa album)
- Brand New (Shinhwa album)
- Brand New (Sista song)
- Brand New (Tyga, YG and Lil Wayne song)
- Brand New (band)
- Brand New / Safety in Numbers
- Brand New Age
- Brand New Bein'
- Brand New Bitch
- Brand New Cadillac
- Brand New Cherry Flavor
- Brand New Congress
- Brand New Couch
- Brand New Dance
- Brand New Dance (song)
- Brand New Day
- Brand New Day (Agents of S.H.I.E.L.D.)
- Brand New Day (Blood, Sweat & Tears album)
- Brand New Day (Eddie Money album)
- Brand New Day (Kodaline song)
- Brand New Day (Massari song)
- Brand New Day (Ricki-Lee Coulter album)
- Brand New Day (Sting album)
- Brand New Day (Sting song)
- Brand New Day (Swollen Members album)
- Brand New Day (The Mavericks album)
- Brand New Day (The Watchmen album)
- Brand New Day (Van Morrison song)
- Brand New Era
- Brand New Eyes
- Brand New Eyes World Tour
- Brand New Friend
- Brand New Girlfriend
- Brand New Girlfriend (song)
- Brand New History
- Brand New Hong Kong
- Brand New Immortals
- Brand New Key
- Brand New Knife
- Brand New Life
- Brand New Love
- Brand New Love (album)
- Brand New Love (disambiguation)
- Brand New Love Affair
- Brand New Love Affair (EP)
- Brand New Love Affair (song)
- Brand New Lover
- Brand New Machine
- Brand New Maid
- Brand New Man
- Brand New Man (song)
- Brand New Me
- Brand New Me (Alicia Keys song)
- Brand New Me (Dusty Springfield song)
- Brand New Me (EP)
- Brand New Me (John Michael Montgomery album)
- Brand New Morning
- Brand New Morning (Bob Seger album)
- Brand New Morning (Magnum album)
- Brand New Morning / Jealousy Jealousy
- Brand New Music
- Brand New Parade
- Brand New Planet
- Brand New School
- Brand New Second Hand
- Brand New Sin
- Brand New Strings
- Brand New Sun
- Brand New Theatre
- Brand New Unit
- Brand New War
- Brand New World
- Brand New World (EP)
- Brand New Year
- Brand New by Tomorrow
- Brand New discography
{{Draft:PrefixIndexListed|Brand New|colwidth=18em|redr=n|stripprefix=y}}
- Brand New
- -U
- /Modest Mouse Tour
- (Ben Rector album)
- (Ben Rector song)
- (EP)
- (Gary Stewart album)
- (Kevin Simm album)
- (Rhymefest song)
- (Salt-n-Pepa album)
- (Shinhwa album)
- (Sista song)
- (Tyga, YG and Lil Wayne song)
- (band)
- / Safety in Numbers
- Age
- Bein'
- Bitch
- Cadillac
- Cherry Flavor
- Congress
- Couch
- Dance
- Dance (song)
- Day
- Day (Agents of S.H.I.E.L.D.)
- Day (Blood, Sweat & Tears album)
- Day (Eddie Money album)
- Day (Kodaline song)
- Day (Massari song)
- Day (Ricki-Lee Coulter album)
- Day (Sting album)
- Day (Sting song)
- Day (Swollen Members album)
- Day (The Mavericks album)
- Day (The Watchmen album)
- Day (Van Morrison song)
- Era
- Eyes
- Eyes World Tour
- Friend
- Girlfriend
- Girlfriend (song)
- History
- Hong Kong
- Immortals
- Key
- Knife
- Life
- Love
- Love (album)
- Love (disambiguation)
- Love Affair
- Love Affair (EP)
- Love Affair (song)
- Lover
- Machine
- Maid
- Man
- Man (song)
- Me
- Me (Alicia Keys song)
- Me (Dusty Springfield song)
- Me (EP)
- Me (John Michael Montgomery album)
- Morning
- Morning (Bob Seger album)
- Morning (Magnum album)
- Morning / Jealousy Jealousy
- Music
- Parade
- Planet
- School
- Second Hand
- Sin
- Strings
- Sun
- Theatre
- Unit
- War
- World
- World (EP)
- Year
- by Tomorrow
- discography
{{Special:PrefixIndex/Draft:PrefixIndexListed}}
{{div col|colums=2}} {{Special:PrefixIndex/Draft:PrefixIndexListed}} {{div col end}}
{{div col|colums=2}} <ul class=listify> {{Special:PrefixIndex/Draft:PrefixIndexListed}} </ul> {{div col end}}
{{Special:PrefixIndex/Brand New |hideredirects=1 |stripprefix=1 |columns=6}}
- Brand New
- -U
- /Modest Mouse Tour
- (Ben Rector album)
- (Ben Rector song)
- (EP)
- (Gary Stewart album)
- (Kevin Simm album)
- (Rhymefest song)
- (Salt-n-Pepa album)
- (Shinhwa album)
- (Sista song)
- (Tyga, YG and Lil Wayne song)
- (band)
- / Safety in Numbers
- Age
- Bein'
- Bitch
- Cadillac
- Cherry Flavor
- Congress
- Couch
- Dance
- Dance (song)
- Day
- Day (Agents of S.H.I.E.L.D.)
- Day (Blood, Sweat & Tears album)
- Day (Eddie Money album)
- Day (Kodaline song)
- Day (Massari song)
- Day (Ricki-Lee Coulter album)
- Day (Sting album)
- Day (Sting song)
- Day (Swollen Members album)
- Day (The Mavericks album)
- Day (The Watchmen album)
- Day (Van Morrison song)
- Era
- Eyes
- Eyes World Tour
- Friend
- Girlfriend
- Girlfriend (song)
- History
- Hong Kong
- Immortals
- Key
- Knife
- Life
- Love
- Love (album)
- Love (disambiguation)
- Love Affair
- Love Affair (EP)
- Love Affair (song)
- Lover
- Machine
- Maid
- Man
- Man (song)
- Me
- Me (Alicia Keys song)
- Me (Dusty Springfield song)
- Me (EP)
- Me (John Michael Montgomery album)
- Morning
- Morning (Bob Seger album)
- Morning (Magnum album)
- Morning / Jealousy Jealousy
- Music
- Parade
- Planet
- School
- Second Hand
- Sin
- Strings
- Sun
- Theatre
- Unit
- War
- World
- World (EP)
- Year
- by Tomorrow
- discography