Template:Hp-highlight: Difference between revisions
m (1 revision imported: Import new Homepage templates (exported from PPR)) |
(remove the ... after internal links - during Prosumer (update ch.K and ch.P)) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="col | __NOEDITSECTION__<includeonly>{{#default_form:Hp-highlight}}<div class="col-12 col-md-6 highlight-section-block"> | ||
<h3>{{{title}}}</h3> | <h3>{{{title}}}</h3> | ||
<h4 class="subtitle>{{{subtitle}}}</h4> | <h4 class="subtitle">{{{subtitle}}}</h4> | ||
<div class="row"> | <div class="row"> | ||
<div class="col | <div class="col-12 col-lg-5"> | ||
[[file:{{{image}}}|class=img- | [[file:{{{image}}}|class=img-fluid|link={{{link|}}}]] | ||
</div> | </div> | ||
<div class="col | <div class="col-12 col-lg-7"> | ||
{{{text}}} | {{{text}}} | ||
<p>{{#ifeq: {{#sub:{{{link}}}|0|4}} | http |[{{{link}}} <span class="btn btn-primary">{{{btn-text}}}</span>] | [[{{{link}}}|> {{{btn-text}}} | <p class="highlight-link">{{#ifeq: {{#sub:{{{link}}}|0|4}} | http |[{{{link}}} <span class="btn btn-primary">{{{btn-text}}}</span>] | [[{{{link}}}|> {{{btn-text}}}]]}}</p><!-- | ||
-->{{#if: {{{link2|}}} | | -->{{#if: {{{link2|}}} | | ||
<br>{{{text2}}} | <br>{{{text2}}} | ||
<p>{{#ifeq: {{#sub:{{{link2}}}|0|4}} | http |[{{{link2}}} > {{{btn-text2}}}] | [[{{{link2}}}|> {{{btn-text2}}} | <p class="highlight-link2">{{#ifeq: {{#sub:{{{link2}}}|0|4}} | http |[{{{link2}}} > {{{btn-text2}}}] | [[{{{link2}}}|> {{{btn-text2}}}]]}}</p>|}} | ||
</div> | </div> | ||
</div> | </div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||
< | This is the "Hp-highlight" template, used to create "highlights" on the Homepage. | ||
To create Hp-highlights using this template, use the [[Form:Hp-highlight|dedicated form page]] | |||
Alternatively, you can call this template in the following format: | |||
<pre> | |||
{{Hp-highlight | |||
|title= | |||
|subtitle= | |||
|image= | |||
|text= | |||
|btn-text= | |||
|link= | |||
|text2= | |||
|btn-text2= | |||
|link2= | |||
}} | |||
</pre> | |||
Edit the page to see the template text. | |||
---- | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"title": { | "title": { | ||
"label": "Title", | "label": "Title", | ||
"description": "Title of the highlight", | "description": "Title of the highlight", | ||
"example": " | "example": "Electrical Fire Prevention", | ||
"required": true | "required": true | ||
}, | }, | ||
Line 41: | Line 59: | ||
"image": { | "image": { | ||
"label": "Image", | "label": "Image", | ||
"description": "The image to show in this highlight (recommended size = | "description": "The image to show in this highlight (recommended size = 200x270px)", | ||
"example": "help-section-doc.png", | "example": "help-section-doc.png", | ||
"type": "wiki-file-name", | "type": "wiki-file-name", | ||
"required": true | "required": true | ||
}, | }, | ||
Line 66: | Line 77: | ||
"required": true | "required": true | ||
}, | }, | ||
" | "link": { | ||
"label": " | "label": "Link", | ||
"description": " | "description": "Link of the Call To Action (can be a wiki page name or an external url)", | ||
"example": "http://www.schneider-electric.com/en/download/document/9982095_02-08-17A_EN/", | "example": "http://www.schneider-electric.com/en/download/document/9982095_02-08-17A_EN/", | ||
"type": "string", | "type": "string", | ||
" | "required": true | ||
}, | }, | ||
"text2": { | "text2": { | ||
Line 83: | Line 94: | ||
"description": "Optional second CTA - Text of the link/button", | "description": "Optional second CTA - Text of the link/button", | ||
"example": "Donwload the guide", | "example": "Donwload the guide", | ||
"type": "string", | |||
"suggested": true | |||
}, | |||
"link2": { | |||
"label": "Link2", | |||
"description": "Optional second CTA - link (can be a wiki page name or an external url)", | |||
"example": "http://www.schneider-electric.com/en/download/document/9982095_02-08-17A_EN/", | |||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
} | } | ||
}, | }, | ||
"description": "This | "description": "This is the \"Hp-highlight\" template, used to create \"highlights\" on the Homepage. Details on its parameters" | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 16:26, 10 November 2023
This is the "Hp-highlight" template, used to create "highlights" on the Homepage.
To create Hp-highlights using this template, use the dedicated form page
Alternatively, you can call this template in the following format:
{{Hp-highlight |title= |subtitle= |image= |text= |btn-text= |link= |text2= |btn-text2= |link2= }}
Edit the page to see the template text.
This is the "Hp-highlight" template, used to create "highlights" on the Homepage. Details on its parameters
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | Title of the highlight
| Unknown | required |
Subtitle | subtitle | Subtitle of the highlight
| String | required |
Image | image | The image to show in this highlight (recommended size = 200x270px)
| File | required |
Text | text | Text giving details about this highlight | Unbalanced wikitext | suggested |
Button or link text | btn-text | The text of the link/button
| String | required |
Link | link | Link of the Call To Action (can be a wiki page name or an external url)
| String | required |
Text2 | text2 | Optional second CTA - Text | Unbalanced wikitext | suggested |
2nd Button or 2nd link text | btn-text2 | Optional second CTA - Text of the link/button
| String | suggested |
Link2 | link2 | Optional second CTA - link (can be a wiki page name or an external url)
| String | suggested |