Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
NeoWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Knowledge Wiki Forever
Page
Discussion
English
Read
Edit
View history
Data
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
Data
General
What links here
Related changes
Special pages
Page information
NeoWiki
Manage subjects
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This page collects working examples of features available in the updated NeoWiki installation on this wiki. == Subject rendering with <code><nowiki>{{#view}}</nowiki></code> == The updated NeoWiki can render a Subject directly on a page. Source: <pre><nowiki>{{#view:s1demo1aaaaaaa1}}</nowiki></pre> Result: {{#view:s1demo1aaaaaaa1}} == Read values inline with <code><nowiki>{{#neowiki_value}}</nowiki></code> == This parser function lets wikitext read structured data without writing Lua or Cypher. Source: <pre><nowiki>Founded year: {{#neowiki_value:Founded at|page=ACME Inc}} Products: {{#neowiki_value:Products|page=ACME Inc|separator=, }} Museum visitors: {{#neowiki_value:Annual visitors|page=Rijksmuseum}} Website: {{#neowiki_value:Websites|page=ACME Inc}}</nowiki></pre> Result: * Founded year: {{#neowiki_value:Founded at|page=ACME Inc}} * Products: {{#neowiki_value:Products|page=ACME Inc|separator=, }} * Museum visitors: {{#neowiki_value:Annual visitors|page=Rijksmuseum}} * Website: {{#neowiki_value:Websites|page=ACME Inc}} == Run read-only Cypher with <code><nowiki>{{#cypher_raw}}</nowiki></code> == The updated NeoWiki keeps the raw Cypher parser function for debugging and exploration. Source: <pre><nowiki>{{#cypher_raw:MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 5}}</nowiki></pre> Result: {{#cypher_raw:MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 5}} == Special pages and page-level subject management == The newer UI adds or improves dedicated management surfaces. * [[Special:Schemas]] for schema administration * [[Special:Layouts]] for layout administration * [{{fullurl:ACME Inc|action=subjects}} ACME Inc data tab] for page-level subject management == Lua API via <code>mw.neowiki</code> == The newer Lua API is one of the biggest additions. It exposes structured data directly to Scribunto modules. <pre>local nw = require( 'mw.neowiki' ) local founded = nw.getValue( 'Founded at', { page = 'ACME Inc' } ) local products = nw.getAll( 'Products', { page = 'ACME Inc' } ) local subject = nw.getMainSubject( 'ACME Inc' ) local sameSubject = nw.getSubject( 's1demo1aaaaaaa1' ) local children = nw.getChildSubjects( 'ACME Inc' ) local schema = nw.getSchema( 'Company' ) local museums = nw.query( 'MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 3' )</pre> Functions now documented and available in the updated extension include: * <code>getValue</code> * <code>getAll</code> * <code>getMainSubject</code> * <code>getSubject</code> * <code>getChildSubjects</code> * <code>getSchema</code> * <code>query</code> == REST API examples == NeoWiki now has a documented REST surface under <code>/neowiki/v0/*</code>. <pre>GET /rest.php/neowiki/v0/subject/s1demo1aaaaaaa1 GET /rest.php/neowiki/v0/schema/Company GET /rest.php/neowiki/v0/layout/{layoutName} GET /rest.php/neowiki/v0/layouts GET /rest.php/neowiki/v0/page/{pageId}/subjects PUT /rest.php/neowiki/v0/subject/{subjectId}</pre> If you want the generated OpenAPI spec exposed on this wiki, enable it in <code>LocalSettings.php</code>: <pre>$wgRestAPIAdditionalRouteFiles[] = 'includes/Rest/specs.v0.json';</pre> == Newer property-type support == The updated NeoWiki adds stronger support for <code>select</code> and <code>dateTime</code> property types, including better validation and editing behavior. Example schema snippets: <pre>{ "name": "Status", "type": "select", "options": [ { "id": "active", "label": "Active" }, { "id": "paused", "label": "Paused" } ] }</pre> <pre>{ "name": "Launch time", "type": "dateTime", "required": true }</pre> == Layouts and multiple presentations == Layouts now have a more complete editing and management workflow. The key entry point is [[Special:Layouts]]. The idea is that one Subject can be shown in multiple ways depending on context, while the underlying structured data remains the same. == Notes == This page is intentionally a compact feature showcase for the newer NeoWiki build now running on this wiki.
Summary:
Please note that all contributions to NeoWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
NeoWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)