Manual:Extension/Page Forms/Snippets: Difference between revisions

(Created page with "== Populating a dropdown with values from a (sub-) category == === Using DPL query === (Solution found at: https://www.mediawiki.org/wiki/Extension_talk:DynamicPageList3#Retu...")
 
No edit summary
Line 1: Line 1:
== Populating a dropdown with values from a (sub-) category ==
== Providing input values from a (sub-) category ==


=== Using DPL query ===
=== Using DPL query (dropdown) ===
(Solution found at: https://www.mediawiki.org/wiki/Extension_talk:DynamicPageList3#Return_page_titles_as_plain_text?<syntaxhighlight lang="text">
(Solution found at: https://www.mediawiki.org/wiki/Extension_talk:DynamicPageList3#Return_page_titles_as_plain_text?<syntaxhighlight lang="text">
| {{{field
{{{field
  | dokumententyp
  | doctype
  | input type=dropdown
  | input type=dropdown
  | values = {{#dpl: namespace = Category
  | values = {{#dpl: namespace = Category
Line 13: Line 13:
   }}
   }}
}}}
}}}
</syntaxhighlight>
</syntaxhighlight>Form field:
 
Example template output:
 
<code>doctype=Process</code>
 
=== Using input type "tree" ===
(see official documentation: [[mediawikiwiki:Extension:Page_Forms/Input_types#tree|mediawiki.org/wiki/Extension:Page_Forms/Input_types#tree]]  )<syntaxhighlight lang="text">
{{{field|doctype|input type=tree|top category=Document type|depth=1|hideroot|list}}}
</syntaxhighlight>Form field:
 
Example template output:
 
<code>doctype=Process</code>
 
=== Using a SMW concept ===

Revision as of 16:29, 20 April 2023

Providing input values from a (sub-) category

Using DPL query (dropdown)

(Solution found at: https://www.mediawiki.org/wiki/Extension_talk:DynamicPageList3#Return_page_titles_as_plain_text?

{{{field
 | doctype
 | input type=dropdown
 | values = {{#dpl: namespace = Category
 | category = Dokumententyp
 | mode = inline
 | format = ,¶%TITLE%,,
 | inlinetext = ,
  }}
}}}

Form field:

Example template output:

doctype=Process

Using input type "tree"

(see official documentation: mediawiki.org/wiki/Extension:Page_Forms/Input_types#tree )

{{{field|doctype|input type=tree|top category=Document type|depth=1|hideroot|list}}}

Form field:

Example template output:

doctype=Process

Using a SMW concept




To submit feedback about this documentation, visit our community forum.