Meryam Sahin (talk | contribs) NeoWiki parser function test page |
Meryam Sahin (talk | contribs) Restore section headings |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Test page for the NeoWiki parser functions in BlueSpice Galaxy. Every example below shows the source code and the live result. Test data: existing subjects in this wiki (schemas "Document Control", "ISO 27001 Control", "Role"). | Test page for the NeoWiki parser functions in BlueSpice Galaxy. Every example below shows the source code and the live result. Test data: existing subjects in this wiki (schemas "Document Control", "ISO 27001 Control", "Role"). VE round-trip test. | ||
== #neowiki_show == | == #neowiki_show == | ||
| Line 32: | Line 32: | ||
''Second (non-main) subject on the page, addressed by its schema name.'' | ''Second (non-main) subject on the page, addressed by its schema name.'' | ||
== #neowiki_value == | == #neowiki_value == | ||
| Line 54: | Line 43: | ||
''raw=true: no visible difference.'' | ''raw=true: no visible difference.'' | ||
== #neowiki_query == | == #neowiki_query == | ||
| Line 69: | Line 52: | ||
<pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}</nowiki></pre> | <pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}</nowiki></pre> | ||
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}} | '''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}} | ||
<pre><nowiki>{{#neowiki_query:{"properties":{"ISO 27001 Control.Implementation status":"Status","ISO 27001 Control.Category":null},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}</nowiki></pre> | <pre><nowiki>{{#neowiki_query:{"properties":{"ISO 27001 Control.Implementation status":"Status","ISO 27001 Control.Category":null},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}</nowiki></pre> | ||
| Line 98: | Line 76: | ||
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Implementation status","operator":"!=","value":"implemented"}],"hasSubjects":["ISO 27001 Control"]}|format=kpitile|label=Open controls|max=9|unit=controls|color-thresholds=0:green{{!}}1:yellow{{!}}3:red}} | '''Result:''' {{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Implementation status","operator":"!=","value":"implemented"}],"hasSubjects":["ISO 27001 Control"]}|format=kpitile|label=Open controls|max=9|unit=controls|color-thresholds=0:green{{!}}1:yellow{{!}}3:red}} | ||
''Pipes inside color-thresholds must be written as {{!}}.'' | ''Pipes inside color-thresholds must be written as <nowiki>{{!}}</nowiki>.'' | ||
=== conditions, sort, limit === | === conditions, sort, limit === | ||
| Line 122: | Line 100: | ||
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[{"property":"Document Control.Valid until","operator":"IS NOT NULL","value":""}],"hasSubjects":["Document Control"]}|format=count}} | '''Result:''' {{#neowiki_query:{"properties":{},"conditions":[{"property":"Document Control.Valid until","operator":"IS NOT NULL","value":""}],"hasSubjects":["Document Control"]}|format=count}} | ||
== Inside a template, parameters via <nowiki>{{{1}}}</nowiki> == | |||
== Inside a template, parameters via {{{1}}} == | |||
<pre><nowiki>{{:NeoWiki Test/Template show|Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}</nowiki></pre> | <pre><nowiki>{{:NeoWiki Test/Template show|Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}</nowiki></pre> | ||
'''Result:''' {{:NeoWiki Test/Template show|Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}} | '''Result:''' {{:NeoWiki Test/Template show|Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}} | ||
| Line 140: | Line 112: | ||
== Pipe escape {{!}} == | == Pipe escape <nowiki>{{!}}</nowiki> == | ||
<pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page{{!}}•]] }}</nowiki></pre> | <pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page{{!}}•]] }}</nowiki></pre> | ||
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page{{!}}•]] }} | '''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page{{!}}•]] }} | ||
Latest revision as of 12:19, 4 November 2026
Test page for the NeoWiki parser functions in BlueSpice Galaxy. Every example below shows the source code and the live result. Test data: existing subjects in this wiki (schemas "Document Control", "ISO 27001 Control", "Role"). VE round-trip test.
#neowiki_show
{{#neowiki_show:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}
Result: Risk evaluation
Select property: returns the option label.
{{#neowiki_show:Controlled Document:ISO 27001/Control/A.5.1 Policies for information security|ISO 27001 Control.Justification}}
Result:
Text property.
{{#neowiki_show:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Valid until}}
Result: 1830211200
Date property: returns a Unix timestamp.
{{#time:Y-m-d|@{{#neowiki_show:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Valid until}}}}
Result: 2027-12-31
Date formatted with #time.
{{#neowiki_show:Controlled Document:Role/Quality Manager|Role.Assigned person}}
Result: W0184987740
User property: returns the user name.
{{#neowiki_show:Controlled Document:ISO 27001/Control/A.5.1 Policies for information security|Document Control.Document type}}
Result:
Second (non-main) subject on the page, addressed by its schema name.
#neowiki_value
{{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}
Result: Risk evaluation
Same positional syntax and output as #neowiki_show.
{{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Valid until|raw=true}}
Result: 1830211200
raw=true: no visible difference.
#neowiki_query
count
{{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=count}}
Result: 0
list
{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}
Result:
{{#neowiki_query:{"properties":{"ISO 27001 Control.Implementation status":"Status","ISO 27001 Control.Category":null},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}
Result:
Properties with and without display label.
grid
{{#neowiki_query:{"properties":{"ISO 27001 Control.Implementation status":"Status","ISO 27001 Control.Category":"Category"},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=grid}}
Result:
template
{{#neowiki_query:{"properties":{"ISO 27001 Control.Implementation status":"Status","ISO 27001 Control.Category":"Category"},"conditions":[],"limit":3,"hasSubjects":["ISO 27001 Control"]}|format=template|template=:NeoWiki Test/Row}}
Result:
Row page: NeoWiki Test/Row. Leading colon needed for a main-namespace page.
chart
{{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=chart|chart-type=bar|group-by=ISO 27001 Control.Implementation status|showvalues=1}}
Result: No data to chart.
kpitile
{{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Implementation status","operator":"!=","value":"implemented"}],"hasSubjects":["ISO 27001 Control"]}|format=kpitile|label=Open controls|max=9|unit=controls|color-thresholds=0:green{{!}}1:yellow{{!}}3:red}}
Result:
Pipes inside color-thresholds must be written as {{!}}.
conditions, sort, limit
{{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Implementation status","operator":"IN","value":["implemented","not implemented"]}],"hasSubjects":["ISO 27001 Control"]}|format=count}}
Result: 0
IN = OR within one property.
{{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Category","operator":"=","value":"Organisational"}],"hasSubjects":["ISO 27001 Control"]}|format=count}}
Result: 0
Select condition uses the option label.
{{#neowiki_query:{"properties":{},"conditions":[{"property":"name","operator":"~","value":"Segregation"}],"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list}}
Result:
~ = contains, on the page name.
{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"sort":[{"property":"name","direction":"DESC"}],"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}
Result:
{{#neowiki_query:{"properties":{},"conditions":[{"property":"Document Control.Valid until","operator":"IS NOT NULL","value":""}],"hasSubjects":["Document Control"]}|format=count}}
Result: 3
Inside a template, parameters via {{{1}}}
{{:NeoWiki Test/Template show|Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}
Result: Risk evaluation
Template: NeoWiki Test/Template show
{{:NeoWiki Test/Template query|Organisational}}
Result: 0
Template: NeoWiki Test/Template query (default format count)
Pipe escape {{!}}
{{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page{{!}}•]] }}
Result:
Piped link in the separator, escaped.
{{#neowiki_query:{"properties":{},"conditions":[],"limit":2,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator= [[Main Page|•]] }}
Result:
Piped link in the separator, unescaped: also works (pipes inside [[ ]] are not parameter separators).