Manual:Extension/InputBox: Difference between revisions

(Created page with "The '''InputBox''' extension allows to automatically create a new page via an input field with a specific page name and - optionally - in a specific namespace. <br /> Datei...")
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
Line 2: Line 2:


<br />
<br />
[[Datei:inputbox.png|alt=Inputbox to createa wiki page|center|thumb|450x450px|Inputbox to create a wiki page]]
[[File:inputbox.png|alt=Inputbox to create a wiki page|center|thumb|450x450px|Inputbox to create a wiki page]]
<br />A typical example of this is creating meeting minutes that follow a consistent content structure. The following code can be added to the source code of a page:<syntaxhighlight lang="text">
<br />A typical example of this is creating meeting minutes that follow a consistent content structure. The following code can be added to the source code of a page:<syntaxhighlight lang="text">
<inputbox>
<inputbox>

Revision as of 12:25, 4 October 2022

The InputBox extension allows to automatically create a new page via an input field with a specific page name and - optionally - in a specific namespace.


File:inputbox.png
Inputbox to create a wiki page


A typical example of this is creating meeting minutes that follow a consistent content structure. The following code can be added to the source code of a page:

<inputbox>
type=create
default={{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}
prefix=Meeting:IT/Jour fixe/
preload=Meeting:Standard minutes
buttonlabel=New minutes
break=no
width=30
useve=true
</inputbox>

Description of the settings:

Wert
type create Creates a new page
default Suggestion for a name for the new page; here in the example: current edate
prefix Seitenpfad Path to a namespace or subpage.
preload Pfad zur Vorlage Loads the default text for the new page from a template, if you are not using a template, this line can be deleted. If the template is not found, a blank page is created.
buttonlabel Text Text that is shown on the button.
break no Places the button behind the text field rather than below.
width 30 Size of the inputbox in characters
useve true Opens the new page directly in visual editing mode

Show latest minutes

If you want to display links to the last 5 meeting minutes by creation date directly below the input box, you can add the following query in the source code below the input box, specifying the path to the logs in the square brackets in the #ask query (i.e. the prefix-path from the inputbox followed by a *:

List of minutes:
<div>
{{#ask:[[~IT/Jour Fixe/*]]
|limit=5
|sort=creation date
|order=desc
|format=ul
|default=There are currently no minutes
|searchlabel= &#8594; More IT-Jour Fixe minutes
}}
</div>

Beschreibung der Einstellungen zur Anzeige der letzten Protokolle:

Name Wert
#ask [[ ]] create The path to the minutes is pecified here. Alternatively, the category if the logs are assigned to a category.
limit Zahl Number of results. Below, a more... link will be shown
sort creation date Sorting of resulst by creation date
order desc Ordered descending
format ul Results format is an unordered list
default Text Text to show if no results exist
search label Text Label for the link to additional results (is shown only if there are more results than the defined limit]

Template:Box Links



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

Discussions