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: Required to define and communicate the overall framework for information security and the ISMS through management-approved policies.

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: Control

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: 9

list

{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"pageDisplayFormat":"subpage","showPageLink":false,"hasSubjects":["ISO 27001 Control"]}|format=list|separator=<br>}}

Result: A.5.1 Policies for information security
A.5.10 Acceptable use of information and other associated assets
A.5.2 Information security roles and responsibilities

{{#neowiki_query:{"properties":{},"conditions":[],"limit":3,"hasSubjects":["ISO 27001 Control"]}|format=list}}

Result: Controlled Document:ISO 27001/Control/A.5.1 Policies for information security,Controlled Document:ISO 27001/Control/A.5.10 Acceptable use of information and other associated assets,Controlled Document:ISO 27001/Control/A.5.2 Information security roles and responsibilities

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: A.5.1 Policies for information security (Status: implemented, ISO 27001 Control.Category: Organisational)
A.5.10 Acceptable use of information and other associated assets (Status: implemented, ISO 27001 Control.Category: Organisational)
A.5.2 Information security roles and responsibilities (Status: implemented, ISO 27001 Control.Category: Organisational)

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:

  • Controlled Document:ISO 27001/Control/A.5.1 Policies for information security – display: Controlled Document:ISO 27001/Control/A.5.1 Policies for information security – status: implemented – category: Organisational – 1: -
  • Controlled Document:ISO 27001/Control/A.5.10 Acceptable use of information and other associated assets – display: Controlled Document:ISO 27001/Control/A.5.10 Acceptable use of information and other associated assets – status: implemented – category: Organisational – 1: -
  • Controlled Document:ISO 27001/Control/A.5.2 Information security roles and responsibilities – display: Controlled Document:ISO 27001/Control/A.5.2 Information security roles and responsibilities – status: implemented – category: Organisational – 1: -

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:

Bar 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
3 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: 7

IN = OR within one property.

{{#neowiki_query:{"properties":{},"conditions":[{"property":"ISO 27001 Control.Category","operator":"=","value":"Organisational"}],"hasSubjects":["ISO 27001 Control"]}|format=count}}

Result: 9

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: A.5.3 Segregation of duties

~ = 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: A.5.9 Inventory of information and other associated assets
A.5.8 Information security in project management
A.5.7 Threat intelligence

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

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: A.5.1 Policies for information security•A.5.10 Acceptable use of information and other associated assets

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: A.5.1 Policies for information security•A.5.10 Acceptable use of information and other associated assets

Piped link in the separator, unescaped: also works (pipes inside [[ ]] are not parameter separators).