Meryam Sahin (talk | contribs)
NeoWiki parser function test page
 
Meryam Sahin (talk | contribs)
VE round-trip test
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 ==

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_show:Controlled Document:Risk evaluation/Missing or incomplete data backups|Document Control.Owner Role}}

Result:

Relation property: returns nothing.

{{#neowiki_show:{{FULLPAGENAME}}|Document Control.Document type}}

Result:

Current page (this page has no subject, so empty).


#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_value: Document type | page=Controlled Document:Risk evaluation/Missing or incomplete data backups}}

Result:

Documented NeoWiki syntax (named page=): returns nothing in this wiki.


#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":{},"conditions":[],"limit":3,"hasSubjects":["ISO 27001 Control"]}|format=list}}

Result:

Default page links: the namespace is dropped from the link target (red links).

{{#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

{{#neowiki_query:{"properties":{},"conditions":[{"property":"Document Control.Valid until","operator":"<","value":"2028-01-01"}],"hasSubjects":["Document Control"]}|format=count}}

Result: 0

Date comparison: returns 0 although 3 pages have a date before 2028.


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