(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Class definition | {{Class definition | ||
|Defines class=Page | |Defines class=Page | ||
− | |Pagetitle format= | + | |Pagetitle format=title |
− | |Allowed namespaces=DevOps | + | |Allowed namespaces=(Main),DevOps |
|Layout areas='main sidebar' | |Layout areas='main sidebar' | ||
|Layout columns=auto 20em | |Layout columns=auto 20em | ||
Line 19: | Line 19: | ||
|Name=Short description | |Name=Short description | ||
|Formfield type=text | |Formfield type=text | ||
− | |Slot=ws- | + | |Slot=ws-class-props |
|Sorting number=2 | |Sorting number=2 | ||
}} | }} | ||
}} | }} |
Latest revision as of 13:23, 10 August 2022
Class
Page with pagetitle format title
Allowed namespaces:
- (Main)
- DevOps
Has version history: false
Layout
- Areas : 'main sidebar'
- Columns : auto 20em
- Rows : auto
Storage templates
- Base properties: Template:Base properties
- Page properties: Template:Page properties
Component templates
- Sidebar template: Template:Page sidebar
Defined parameters
Name | Property | Slot | Formfield type | Allowed values | Required | Multiple |
---|---|---|---|---|---|---|
Title | Property:Title | ws-base-props | text | Yes | No | |
Short description | Property:Short description | ws-class-props | text | No | No | |
Automatically generated template code
Open one of the tabs to view automatically generated template code. This is meant to be used when creating new templates.
If you are modifying an existing template, it might still be useful to update the parameter definitions and use parts of the generated code, but be careful not to completely overwrite existing templates. Existing templates will likely have had other modifications that are not included in the automatically generated code.
Template:Page properties
<noinclude> This is the '''Page properties''' template. It should be called in the following format: <pre> {{Page properties |Short description= (optional: text) }} </pre> </noinclude><includeonly>{{#set: |Short description={{{Short description|}}} }}</includeonly>
Template:Page sidebar
<noinclude> This is the '''Page sidebar''' template. It should be called in the following format: <pre> {{Page sidebar}} </pre> </noinclude><includeonly><!-- -->{{#vardefine:@allow sidebar edit |{{#ifingroup:user |{{#if:{{#urlget:veaction}}{{#urlget:action}}||yes}} }} }}<!-- --><div class="tab-content"><!-- -->{{#tag:_input||type=radio|id=sidebar-view|name=toggle-sidebar|checked=checked|class=d-none sidebar-view}}<!-- --><div class="card sidebar-view-tab"> <div class="card-header">{{#ifeq:{{#var:@allow sidebar edit}} |yes |<span style="float:right">{{#tag:label|Edit|for=sidebar-edit|class=btn btn-secondary}}</span>}} <b class="d-block">{{#caprint:$base[Base properties][Class]}}</b> {{#caprint:$base[Base properties][Title]}} </div><!-- end of .card-header --> <div class="card-body"> {{Sidebar item |Label=Title |Value={{#caprint:$base[Base properties][Title]}} }}{{Sidebar item |Label=Short description |Value={{#caprint:$class[Page properties][Short description]}} }} </div><!-- end of .card-body --> </div><!-- end of .card -->{{#ifeq:{{#var:@allow sidebar edit}} |yes |<!-- -->{{#tag:_input||type=radio|id=sidebar-edit|name=toggle-sidebar|class=d-none sidebar-edit}}<!-- --><div class="card sidebar-edit-tab"><!-- --><form action="addToWiki"><!-- // _edits for base properties -->{{#tag:_edit ||target={{PAGEID}} |template=Base properties |formfield=Title |mwslot=ws-base-props}}<!-- // _create or _edits for page properties // use casize to check if the slot already exists. Then _edit, else _create. -->{{#if:{{#casize:$class}} |{{#tag:_edit ||target={{PAGEID}} |template=Page properties |formfield=Short description |mwslot=ws-class-props}} |<_create mwwrite="{{FULLPAGENAME}}" mwtemplate="Page properties" mwslot="ws-class-props" mwfields="Short description" /> }}<!-- end of #if --> <div class="card-header"><span style="float:right">{{#tag:label|Close|for=sidebar-view|class=btn btn-secondary}}</span> <b class="d-block">{{#caprint:$base[Base properties][Class]}}</b> {{#caprint:$base[Base properties][Title]}} </div><!-- end of .card-header --> <div class="card-body"> {{Sidebar item |Label=Title |Value={{#tag:input ||type=text |name=Title |required=required |class=form-control |value={{#caprint:$base[Base properties][Title]}} }} }} {{Sidebar item |Label=Short description |Value={{#tag:input ||type=text |name=Short description |class=form-control |value={{#caprint:$class[Page properties][Short description]}} }} }} <div class="text-right"> {{#tag:label|Close|for=sidebar-view|class=btn btn-secondary}} <input type="submit" value="Save" class="btn btn-primary" /> </div> </div><!-- end of .card-body --> </form> </div><!-- end of .card --> |}}<!-- end of #ifeq @allow sidebar edit == yes --> </div><!-- end of .tab-content --></includeonly>