User:Tom/Sandbox7: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
Line 4: Line 4:
The queries will also create links for each namespace where I can add another cargo query to display a bullet list of the pages for that namespace. For example, in my query for “#ask”, it counted 799 pages in the “0” namespace. The query also links each namespace ID to a page (e.g. ../ask/0) where there’s a query to display all pages counted for that namespace:
The queries will also create links for each namespace where I can add another cargo query to display a bullet list of the pages for that namespace. For example, in my query for “#ask”, it counted 799 pages in the “0” namespace. The query also links each namespace ID to a page (e.g. ../ask/0) where there’s a query to display all pages counted for that namespace:


<nowiki>{{#cargo_query:
<code><nowiki>{{#cargo_query:</nowiki></code>
|table=_pageData
 
|fields=_pageName
<code>|table=_pageData</code>
|where=_fullText LIKE '%#ask:%' AND _pageNamespace = {{SUBPAGENAME}}
 
|order by=_pageName ASC
<code>|fields=_pageName</code>
|format=ul
 
}}</nowiki>
<code>|where=_fullText LIKE '%#ask:%' AND _pageNamespace = <nowiki>{{SUBPAGENAME}}</nowiki></code>
 
<code>|order by=_pageName ASC</code>
 
<code>|format=ul</code>
 
<code><nowiki>}}</nowiki></code>


Using the magic word <nowiki>{{SUBPAGENAME}}</nowiki>, I can place this query on every subpage under the parent page. This helps me easily go to a page using “#ask” in whichever namespace it was found in.
Using the magic word <nowiki>{{SUBPAGENAME}}</nowiki>, I can place this query on every subpage under the parent page. This helps me easily go to a page using “#ask” in whichever namespace it was found in.

Navigation menu