User:Ttenbergen/pastebin

From CCMDB Wiki
Jump to navigation Jump to search

SMW

{{#ask: [[CommitteeMember::={{PAGENAME}}]] [[Category:something]] [[Property::something]] [[DICStatus::!retired]]
 [[VacationBackDate ::>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}]] [[!~Dr.*]] [[!:{{PAGENAME}}]]
|default=none found
|mainlabel=- 
|sort=property-to-sort-by
|order=Ascending
|format=UL list datatable
|limit=10
|link=none
|headers=show
|sep=; }}

{{#show: Berlin |?Population }}
{{#set:  Has postcode=75001 }}

Cargo

{{#cargo_query:
tables=table1=tableAlias1, table2=tablesAlias2, etc.
|join on=table1.fieldA = table2.fieldB,table2.fieldC=table3.fieldD, etc.
|fields=sometable._pageName=fieldAlias1,field2=Alias2, workdays._pageName,
CONCAT("[[",a field that's a page, " | ", a field or text we want to show on list instead, "]]")=name, 
CONCAT("\[\{\{fullurl:",Discussions._pageName, "{{!}}action=formedit\}\} edit to add person to role]")=formedit
|where=table1.fieldE="some value" AND/OR etc. _pageID = {{PAGEID}}
|group by=table1.fieldG
|having=table1.fieldG='some value', etc.
|order by=table2.fieldF, etc.
|limit=1000
|default=no results were found
|more results text=some text
|offset=some number
|intro=<b>some text</b>
|outro=some text
|no html
|max display chars=some number
|format=dynamic table ul list
...additional format-based parameters
}}

cargo category query

{{#cargo_query:
tables=_pageData
|fields=_pageName
|where=_categories HOLDS 'Section' and _pageName!="N/A" and not _pageName Like "Category:%"
|limit=5000
|default=none found
}}