Class
Application page with pagetitle format title
Has version history: true
Layout
- Areas : 'sub-header sidebar' 'main sidebar'
- Columns : 3fr 1fr
- Rows : auto 1fr
Storage templates
- Base properties: Template:Base properties
- Page properties: Template:Application page properties
Component templates
- Sidebar template: Template:Application page sidebar
- Sub header template: Template:Application page subheader
Defined parameters
Name | Property | Slot | Formfield type | Allowed values | Required | Multiple |
---|---|---|---|---|---|---|
Origin | Property:Application page origin | ws-class-props | text | No | No | |
Type | Property:Application page type | ws-class-props | token | CSP Basis Core, CSP Basis Examples | 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:Application page properties
<noinclude> This is the '''Application page properties''' template. It should be called in the following format: <pre> {{Application page properties |Type= (optional: text) value options: CSP Basis Core, CSP Basis Examples |Origin= (optional: text) }} </pre> </noinclude><includeonly>{{#set: |Application page type={{{Type|}}} |Application page origin={{{Origin|}}} }}</includeonly>
Template:Application page sidebar
<noinclude> This is the '''Application page sidebar''' template. It should be called in the following format: <pre> {{Application 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=Type |Value={{#caprint:$class[Application page properties][Type]}} }}{{Sidebar item |Label=Origin |Value={{#caprint:$class[Application page properties][Origin]}} }} </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 --><!-- // _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=Application page properties |formfield=Type |mwslot=ws-class-props}} {{#tag:_edit ||target={{PAGEID}} |template=Application page properties |formfield=Origin |mwslot=ws-class-props}} |<_create mwwrite="{{FULLPAGENAME}}" mwtemplate="Application page properties" mwslot="ws-class-props" mwfields="Type,Origin" /> }}<!-- 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=Type |Value={{#cadefine:$value settings |CSP Basis Core, CSP Basis Examples }} {{#cadefine:$values selected |{{#caprint:$class[Application page properties][Type]}} }} {{#camerge:$value options |$value settings |$values selected }} {{#caunique:$value options}} {{#tag:_token |{{#tag:input|(none)|type=option|value=}} {{#camap:$value options |__Value__|{{#tag:input|__Value__|type=option|value=__Value__|selected={{#if:{{#casearch:$values selected|__Value__}}|selected}} }} |}} |name=Type[] |class=form-control |id=type-field |multiple= }} }} {{Sidebar item |Label=Origin |Value={{#tag:input ||type=text |name=Origin |class=form-control |value={{#caprint:$class[Application page properties][Origin]}} }} }} <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 -->{{Show version history}}<!-- --></includeonly>