Template:NeoWiki query: Difference between revisions

Meryam Sahin (talk | contribs)
Wrapper template for metadata content droplet
 
Meryam Sahin (talk | contribs)
Show a hint instead of an error while parameters are empty
Line 1: Line 1:
<includeonly>{{#neowiki_query:{"properties":{},"conditions":[{{#if:{{{property|}}}|{"property":"{{{property}}}","operator":"{{{operator|=}}}","value":"{{{value|}}}"}|}}],"pageDisplayFormat":"{{{display|subpage}}}","showPageLink":false,"limit":{{{limit|50}}},"hasSubjects":["{{{schema|}}}"]}|format={{{format|count}}}|separator={{{separator|, }}}}}</includeonly><noinclude>
<includeonly>{{#if:{{{schema|}}}|{{#neowiki_query:{"properties":{},"conditions":[{{#if:{{{property|}}}|{"property":"{{{property}}}","operator":"{{{operator|=}}}","value":"{{{value|}}}"}|}}],"pageDisplayFormat":"{{{display|subpage}}}","showPageLink":false,"limit":{{{limit|50}}},"hasSubjects":["{{{schema|}}}"]}|format={{{format|count}}}|separator={{{separator|, }}}}}|<span class="metadata-droplet-hint" style="color:#72777d">''Metadata query: open the droplet and fill in the parameters.''</span>}}</includeonly><noinclude>
Counts or lists pages based on page metadata. Used by the "Metadata query" content droplet.
Counts or lists pages based on page metadata. Used by the "Metadata query" content droplet.



Revision as of 12:58, 4 November 2026

Counts or lists pages based on page metadata. Used by the "Metadata query" content droplet.

Counts or lists pages based on page metadata.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Schemaschema

Only pages that have metadata of this schema. Example: ISO 27001 Control

Stringrequired
Filter propertyproperty

Optional. Schema and property, separated by a dot. Example: ISO 27001 Control.Implementation status

Stringoptional
Operatoroperator

= , != , > , >= , < , <= , ~ (contains) or ^ (starts with). Default: =

Default
=
Stringoptional
Valuevalue

Value to compare with. For select properties use the label, for example implemented.

Stringoptional
Formatformat

count or list. Default: count

Suggested values
count list
Default
count
Stringoptional
Separatorseparator

Only for list. Default: comma. Use <br> for one page per line.

Stringoptional
Page name displaydisplay

Only for list. subpage (default), text or prefixed.

Suggested values
subpage text prefixed
Default
subpage
Stringoptional
Limitlimit

Maximum number of pages. Default: 50

Default
50
Numberoptional