Templates download/Collapsible: Difference between revisions

(Created page with "<div class="downloadarea"> <span class="getButton">Download</span> alt=Screenshot of employees gallery|450x450px </div>This template creates an employees gallery that you can include on portal pages, for example. ==Importing the template== {{Templateimport|HW-Employee}} ==Pages included in the import== The xml import creates the following files in your wiki: *Template:Employee *Template:Employee/styles.css ==Cr...")
 
No edit summary
Tag: 2017 source edit
Line 1: Line 1:
<div class="downloadarea">
<div class="downloadarea">
<span class="getButton">[[Media:HW-Employee.zip|Download]]</span>
<span class="getButton">[[Media:HW-Collapsible-en.zip|Download]]</span>
 
[[File:collapsible.png|alt=Page of Known Issues with 6 collapsible items]]
</div>This template creates collapsible page sections with a form. These collapsed sections are shown at the beginning of the page if there is additional content on the page. The form can be customized to allow the collapsible items to be shown at the bottom of the page. The collapsible items cannot be shown in between other text sections if they are updated using the form.


[[File:Employees gallery.png|alt=Screenshot of employees gallery|450x450px]]
</div>This template creates an employees gallery that you can include on portal pages, for example.
==Importing the template==
==Importing the template==
{{Templateimport|HW-Employee}}
{{Templateimport|HW-Collapsible-en}}
==Pages included in the import==
==Pages included in the import==
The xml import creates the following files in your wiki:
The xml import creates the following files in your wiki:


*Template:Employee
*Template:Collapsible
*Template:Employee/styles.css
*Template:Collapsible/styles.css
 
*Template:CollapsibleWrapper
==Creating the employee gallery==
*Form:Collapsible
You can add each individual employee card as a template. Alternatively, you can [[Templates download/Employee#Adding a "batch" of employees|add a "batch" of employees]] directly in the source mode of the page.
# From the Visual Editor ''Insert > Template'' menu, add the template "Employee". [[File:Employee template.png|alt=Screenshot of dialog to select the Employee template|center|thumb|450x450px|Select the Employee template]]
# Provide the necessary information in the [[Templates download/Employee#Available parameters|parameter fields]].


=== Adding a "batch" of employees ===
==Using the template==
To speed up the process, you can quickly add the template multiple times directly in the source editing mode. This also allows you to add a colored grey wrapper around the gallery:<syntaxhighlight lang="text">
# Add the template {{CollapsibleWrapper}} to the source of your page.
<div style="background:#e9e9ee">
# Save the page.
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
# Open the page in forms edit mode.
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
#Click Add another in the form.
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
# Add the text for the collapsible header, a description (expandable text) and (optional) some help text if your content describes an issue and its resolution.
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
# When you are done adding collapsible sections, save the page.
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
{{Employee|title=Title|image=|name=Employee name|department=Department|username=}}
</div>
</syntaxhighlight>


== Available parameters==
{| class="wikitable" style="width: 100%;"
! style="background-color:rgb(234, 236, 240);text-align:center;box-sizing:inherit;padding:0.2em 0.4em;border:1px solid rgb(162, 169, 177);" class="" |
! style="background-color:rgb(234, 236, 240);text-align:center;width:200px;box-sizing:inherit;padding:0.2em 0.4em;border:1px solid rgb(162, 169, 177);" class="" |Element
! style="background-color:rgb(234, 236, 240);text-align:center;width:180px;box-sizing:inherit;padding:0.2em 0.4em;border:1px solid rgb(162, 169, 177);" class="" |Value
! style="background-color:rgb(234, 236, 240);text-align:center;box-sizing:inherit;padding:0.2em 0.4em;border:1px solid rgb(162, 169, 177);" class="" | Description
|-
|1
|title
|text
|Job title
|-
|2
|image
|file name (without naemspace prefix)
|Name of the uploaded user image (e.g.: lastnamefirstname.png). If left empty, the template looks for the profile image of the user.
|-
|3
|name
|text
|Name of the employee
|-
|4
|department
|text
|Department of the employee
|-
|5
|username
|username (without namespace prefix)
|If the user exists in the wiki and the user name is provided, the employee card links to the user's profile page.
|-
|6
|employeepage
|name of a wiki page
|If the employee does not exist as user, an employee page can be created anywhere in the wiki. If a page name is provided here, the employee card links to that page.
|}
__NOTOC__
__NOTOC__
[[en:Vorlagen_Download/Seitenbanner]]
[[de:Vorlagen_Download/Collapsible]]
[[en:{{FULLPAGENAME}}]]

Revision as of 12:42, 9 July 2024

This template creates collapsible page sections with a form. These collapsed sections are shown at the beginning of the page if there is additional content on the page. The form can be customized to allow the collapsible items to be shown at the bottom of the page. The collapsible items cannot be shown in between other text sections if they are updated using the form.

Importing the template

Importing the template

The import file is included in the archive file HW-Collapsible-en.zip. Unpack the zip file first.

On the page Special:Import follow these steps:

  1. Select file and choose HW-Collapsible-en.xml.
  2. Enter an Interwiki prefix. Since this field is required, simply add hw (for hallowelt).
  3. Keep the selection Import to default locations.
  4. Click Upload file... .

The template is now available in your wiki.

Pages included in the import

The xml import creates the following files in your wiki:

  • Template:Collapsible
  • Template:Collapsible/styles.css
  • Template:CollapsibleWrapper
  • Form:Collapsible

Using the template

  1. Add the template


to the source of your page.

  1. Save the page.
  2. Open the page in forms edit mode.
  3. Click Add another in the form.
  4. Add the text for the collapsible header, a description (expandable text) and (optional) some help text if your content describes an issue and its resolution.
  5. When you are done adding collapsible sections, save the page.



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

No categories assignedEdit

Discussions