Template:Content Box: Difference between revisions
Jump to navigation
Jump to search
Sixtus-admin (talk | contribs) (Try to hide generated TOC if many boxes are used) Tag: Reverted |
mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
<templatestyles src="Template:Content_Box/styles.css" /> |
<templatestyles src="Template:Content_Box/styles.css" /> |
||
<div class="content_box"> |
<div class="content_box"> |
||
{{#if:{{{title|}}}|<h3 |
{{#if:{{{title|}}}|<h3>{{{title}}}</h3>|}} |
||
<div {{#if:{{{title|}}}|class="items"|}}>{{{1|{{{content|}}}}}}</div> |
<div {{#if:{{{title|}}}|class="items"|}}>{{{1|{{{content|}}}}}}</div> |
||
</div> |
</div> |
||
| Line 10: | Line 10: | ||
Das [[Template:Content Box/styles.css|Stylesheet]] ist mit Flexbox damit das auch am Handy funktioniert. |
Das [[Template:Content Box/styles.css|Stylesheet]] ist mit Flexbox damit das auch am Handy funktioniert. |
||
Ist |
Ist sinnvoll als <code>content</code> von [[Template:Content Row]]. |
||
[[Category:Templates]] |
|||
<templatedata> |
<templatedata> |
||
{ |
{ |
||
| Line 20: | Line 22: | ||
"label": "Inhalt", |
"label": "Inhalt", |
||
"type": "content", |
"type": "content", |
||
"required": true |
"required": true, |
||
"description": "(der eigentliche Inhalt)" |
|||
}, |
}, |
||
"title": { |
"title": { |
||
"label": "Überschrift" |
"label": "Überschrift", |
||
"description": "(optional mit Überschrift)", |
|||
}, |
|||
" |
"type": "string" |
||
"aliases": [ |
|||
"1" |
|||
], |
|||
"label": "Inhalt", |
|||
"type": "content", |
|||
"required": true |
|||
} |
} |
||
}, |
}, |
||
"description": "Zeichnet einen Kasten" |
"description": "Zeichnet einen Kasten", |
||
"format": "block" |
|||
} |
} |
||
</templatedata> |
</templatedata> |
||
Werden viele Boxen mit <code>title</code> eingebunden, dann erscheinen die Überschriften automatisch im TOC (Table of content). |
|||
Auf Übersichtsseiten (Hauptseite) ist das nicht gewünscht. Dazu einfach <code><nowiki>__NOTOC__</nowiki></code> verwenden. |
|||
</noinclude> |
</noinclude> |
||
Latest revision as of 10:27, 6 February 2022
Generiert einen hübschen Kasten, wahlweise mit Überschrift.
Das Stylesheet ist mit Flexbox damit das auch am Handy funktioniert.
Ist sinnvoll als content von Template:Content Row.
Zeichnet einen Kasten
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Inhalt | 1 content | (der eigentliche Inhalt) | Content | required |
| Überschrift | title | (optional mit Überschrift) | String | optional |
Werden viele Boxen mit title eingebunden, dann erscheinen die Überschriften automatisch im TOC (Table of content).
Auf Übersichtsseiten (Hauptseite) ist das nicht gewünscht. Dazu einfach __NOTOC__ verwenden.