Tech, Bureaucrats, emailconfirmed, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Suppressors, Administrators, threadmoderator
119,454
edits
No edit summary Tag: 2017 source edit |
(→DPL) Tag: 2017 source edit |
||
Line 2: | Line 2: | ||
This page says that, if I hypothetically wanted to get a list of stories that contained the word "blue" in the title, I could use DPL or SMW to get that. But I read both the linked pages and couldn't find anythig about how I would go about doing so on either of them. I found how to filter pages by various attributes, including how I would get a COMPLETE list of stories, but nothing about how to then further filter by a word in the title. Maybe it's just that I'm not very tech savvy but I really don't understand how one would do such a thing. [[User:NightmareofEden|NightmareofEden]] [[User talk:NightmareofEden|<span title="Talk to me">☎</span>]] 21:57, 28 December 2021 (UTC) | This page says that, if I hypothetically wanted to get a list of stories that contained the word "blue" in the title, I could use DPL or SMW to get that. But I read both the linked pages and couldn't find anythig about how I would go about doing so on either of them. I found how to filter pages by various attributes, including how I would get a COMPLETE list of stories, but nothing about how to then further filter by a word in the title. Maybe it's just that I'm not very tech savvy but I really don't understand how one would do such a thing. [[User:NightmareofEden|NightmareofEden]] [[User talk:NightmareofEden|<span title="Talk to me">☎</span>]] 21:57, 28 December 2021 (UTC) | ||
:It's <code>titleregexp</code>. So if you wanted a list of all pages in the main namespace which contain blue somewhere in their title, you'd use: <code><nowiki>{{#dpl:namespace = |titleregexp = .*[Bb]lue.*}}</nowiki></code> | :It's <code>titleregexp</code>. So if you wanted a list of all pages in the main namespace which contain blue somewhere in their title, you'd use: <code><nowiki>{{#dpl:namespace = |titleregexp = .*[Bb]lue.*}}</nowiki></code> | ||
{{#dpl:namespace = |titleregexp = .*[Bb]lue.*| | {{#dpl:namespace = |titleregexp = .*[Bb]lue.*|format=,[[%PAGE%]] ,,}} | ||
:Or if you wanted only pages with ''start'' with "Blue", you'd go for something like | :Or if you wanted only pages with ''start'' with "Blue", you'd go for something like | ||
<code><nowiki>{{#dpl:namespace = |titleregexp = ^Blue.*}}</nowiki></code> | <code><nowiki>{{#dpl:namespace = |titleregexp = ^Blue.*}}</nowiki></code> | ||
{{#dpl:namespace = |titleregexp = ^Blue.*}} | {{#dpl:namespace = |titleregexp = ^Blue.*}} | ||
There's plenty of documentation online, if you want to play around with it and learn how to manipulate the variables. Feel free to use a usersubpage (or [[Tardis:Sandbox]]) as you experiment.{{User:SOTO/sig}} 22:35, 28 December 2021 (UTC) | There's plenty of documentation online, if you want to play around with it and learn how to manipulate the variables. Feel free to use a usersubpage (or [[Tardis:Sandbox]]) as you experiment.{{User:SOTO/sig}} 22:35, 28 December 2021 (UTC) |
edits