Demo VisualData 1.0

From Wikisphere
Demo VisualData
Jump to navigation Jump to search
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
Line 1: Line 1:
{{#visualdataprint: {{FULLPAGENAME}}|schema=Book|template=Book|template?authors=Book authors|format=template}}    
{{#visualdataprint: {{FULLPAGENAME}}|schema=Book|template=Book|template?authors=Book authors|format=template}}    
          
          
This is a page with an infobox that demonstrates the use of VisualData ([https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualData/+/968230 latest version]) used as a [[wikipedia:Create,_read,_update_and_delete|CRUD]]
This is a page with an infobox that demonstrates the use of VisualData ([https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualData/+/968230 latest version]) used as a [[wikipedia:Create,_read,_update_and_delete|CRUD]]

Revision as of 19:37, 24 March 2024

Title The first men in the moon
Authors

name: Herbert Wells

email:

name: George Wells

email:

Cover

This is a page with an infobox that demonstrates the use of VisualData (latest version) used as a CRUD

Click the button below to edit the article's metadata through a popup or the tab "Edit semantic" among the article's actions.


form is loading...


The popup is rendered using the following code

{{#visualdataform: Book
|title = edit infobox and page
|action = edit
|edit-page = {{FULLPAGENAME}}
|return-page = 
|view = popup
|popup-size = medium
|css-class =
|pagename-formula =
|edit-freetext = true	
|edit-categories = false
|edit-content-model = false
|edit-target-slot = false
|target-slot = json-data
|default-categories = 
|default-content-model = wikitext
|preload=
|preload-data=
|layout-align = top
|popup-help = false 
|submit-button-text =
|layout = tabs
|submit-button-text =
|validate-button-text =
}}

A VisualData' form can edit whatever page (through the parameter edit-page, and create new pages with user-defined title or using a pagename formula. It is json/schema compliant[1] and can handle subitems, multiple fields and multiple sub items. It is deeply integrated with the Mediawiki's OOUI library and uses a lot or most of its features. In the latest version can query properties and nested properties, as well as render them using templates and nested templates and does not rely on SemanticMediawiki.


The infobox is rendered through the following code:

{{#visualdataprint: {{FULLPAGENAME}}
|?cover
|?title
|?authors/name
|?authors/email
|schema=Book
|template=Book
|template?authors=Book authors
|format=template
}}


This is a SemanticMediawiki-like parser function that can be used as a shorthand to invoke the more complex {{#visualdataquery}} parser function that can handle multi-page results and provides a basic query language. (more about this on the official page of the extension to be updated soon)

The results are rendered on the page using 2 templates, Template:Book and Template:Book authors. The second is used as a nested template rendered inside the parent template (Template:Book) entitled to render the properties with path authors. Note that the parent template must include a reference to the name of the child template since both values and template's containers are passed as named parameters.


The form's schema(s) (a form can contain an arbitrary number of schemas, and a schema an arbitrary number of items and subitems) can be edited using this Special page or this interface (tab Edit semantic, edit icon on the right and then "Manage schemas")

The related schema created by the UI contains an hidden property "name" that is filled-in with the compounded value of the fields first_name and last_name. Also, the cover file name contains a value-formula, that allows the file to be saved with the article-id as prefix (also for new articles) which is useful to easily upload on the wiki files with similar names.


Have fun with this extension !!


See also


Download

Latest version!

  1. It does not yet support allOf, anyOf, oneOf, and $refs both in the editor and in the viewer