Meryam Sahin (talk | contribs)
Keep only working examples
Meryam Sahin (talk | contribs)
Restore section headings
 
Line 33: Line 33:
''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 ==
<pre><nowiki>{{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}</nowiki></pre>
<pre><nowiki>{{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}</nowiki></pre>
'''Result:''' {{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}
'''Result:''' {{#neowiki_value:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Document type}}
Line 43: Line 44:
''raw=true: no visible difference.''
''raw=true: no visible difference.''


== #neowiki_query ==
=== count ===
<pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=count}}</nowiki></pre>
<pre><nowiki>{{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=count}}</nowiki></pre>
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=count}}
'''Result:''' {{#neowiki_query:{"properties":{},"conditions":[],"hasSubjects":["ISO 27001 Control"]}|format=count}}
Line 97: 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> ==
<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}}

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:

Open controls
0 controls

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).