Template:LinksTo: Difference between revisions
(Created page with "<DPL> namespace = Main nottitleregexp = .*(/..(-..)?|_[(].*[)])$ include = * includematch = #\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}# includemaxlength = 0 results...") |
No edit summary |
||
(44 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
< | <!-- | ||
{{#dpl: | |||
| namespace = | |||
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$ | |||
| titleregexp = ^[A-J] | |||
| include = * | |||
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@ | |||
| includemaxlength = 0 | |||
| format = ,\n* [[%PAGE%|%TITLE%]],, | |||
| resultsheader = There are %TOTALPAGES% pages beginning with A-J\n | |||
}} | |||
{{#dpl: | |||
| namespace = | |||
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$ | |||
| titleregexp = ^K[A-Z] | |||
| include = * | |||
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@ | |||
| includemaxlength = 0 | |||
| format = ,\n* [[%PAGE%|%TITLE%]],, | |||
| resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n | |||
}} | |||
{{#dpl: | |||
| namespace = | |||
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$ | |||
| titleregexp = ^K[a-ce-z] | |||
| include = * | |||
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@ | |||
| includemaxlength = 0 | |||
| format = ,\n* [[%PAGE%|%TITLE%]],, | |||
| resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kc or Ke-Kz\n | |||
}} | |||
{{#dpl: | |||
| namespace = | |||
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$ | |||
| titleregexp = ^Kd | |||
| include = * | |||
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@ | |||
| includemaxlength = 0 | |||
| format = ,\n* [[%PAGE%|%TITLE%]],, | |||
| resultsheader = There are %TOTALPAGES% pages beginning with Kd\n | |||
}} | |||
{{#dpl: | |||
| namespace = | |||
| nottitleregexp = .*((/[a-z][a-z](.{{!}}-..)?){{!}}([ _][(][a-z][a-z](...)?[)]))$ | |||
| titleregexp = ^[L-Z] | |||
| include = * | |||
| includematch = @\[\[([Ss]pecial\:[mM]y[lL]anguage/)?{{{1}}}( )*(\]{{!}}\{{!}}{{!}}#)@ | |||
| includemaxlength = 0 | |||
| format = ,\n* [[%PAGE%|%TITLE%]],, | |||
| resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n | |||
}} | |||
--> | |||
<noinclude> | <noinclude> | ||
[[Template]] | ---- | ||
{{Warning|1=Searching doesn't work on UserBase due do an issue with the 3. party module DynamicPageList3 - | |||
see [https://invent.kde.org/teams/web/wiki-sites/-/issues/16 issue on invent]}} | |||
Finds all English pages in namespace Main linking to the page given as argument. Usage <nowiki>{{LinksTo|</nowiki>'''''page name'''''<nowiki>}}</nowiki>, where '''''page name''''' is the name of the page. Note, that any space characters or underscores in the name should be replaced by <nowiki>[_ ]</nowiki> — that is: 'open square bracket', 'underscore', 'space', 'close square bracket'. This is because the links are found by a string search of the text of pages. In wiki format names can be written with either space or underscore, and for many pages both form occur. | |||
{{Warning|1=Due to the limitations of the underlying database queries, the search is split in five parts, each searching less that 500 pages. To check that this limit is not exceeded, the number of pages in each search is also printed. Should one of the page counts exceed 500, some pages will have been ignored. The template then needs to be modified!}} | |||
As an example, <nowiki>{{LinksTo|Getting[_ ]Help}}</nowiki> gives | |||
{{LinksTo|Getting[_ ]Help}} | |||
[[Category:Template]] | |||
[[Category:TemplateWithIssues]] | |||
</noinclude> | </noinclude> |
Latest revision as of 11:10, 6 March 2024
Finds all English pages in namespace Main linking to the page given as argument. Usage {{LinksTo|page name}}, where page name is the name of the page. Note, that any space characters or underscores in the name should be replaced by [_ ] — that is: 'open square bracket', 'underscore', 'space', 'close square bracket'. This is because the links are found by a string search of the text of pages. In wiki format names can be written with either space or underscore, and for many pages both form occur.
As an example, {{LinksTo|Getting[_ ]Help}} gives