Class

Doc with pagetitle format title

Allowed namespaces:

  • DevOps

Has version history: false

Layout

  • Areas : 'sub-header sidebar' 'main sidebar'
  • Columns : 3fr 1fr
  • Rows : auto 1fr

Storage templates

Component templates


Defined parameters

Name Property Slot Formfield type Allowed values Required Multiple
Title Property:Title ws-base-props text Yes No
Doc parent Property:Doc parent ws-class-props ask token No No
Doc subject Property:Doc subject ws-class-props page Yes No
Doc target group Property:Doc target group ws-class-props select User, Administrator, Developer, All Yes No
Subject version Property:Subject version ws-class-props text Yes 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:Doc properties
<noinclude>

This is the '''Doc properties''' template. It should be called in the following format:

<pre>
{{Doc properties
|Doc parent= (optional: page) 
|Doc subject= (text) 
|Doc target group= (text) value options: User, Administrator, Developer, All
|Subject version= (text) 
}}
</pre>

</noinclude><includeonly>{{#set:
|Doc parent={{{Doc parent|}}}
|Doc subject={{{Doc subject|}}}
|Doc target group={{{Doc target group|}}}
|Subject version={{{Subject version|}}}
}}</includeonly>
Template:Doc sidebar
<noinclude>

This is the '''Doc sidebar''' template. It should be called in the following format:

<pre>
{{Doc 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=Doc target group
|Value={{#caprint:$class[Doc properties][Doc target group]}}
}}{{Sidebar item
|Label=Doc parent
|Value={{#caamap:{{#caprint:$class[Doc properties][Doc parent]}} |,|@@|[[@@ |{{#show:@@ |?Title}} ]]|<br>}}
}}{{Sidebar item
|Label=Subject version
|Value={{#caprint:$class[Doc properties][Subject version]}}
}}{{Sidebar item
|Label=Doc subject
|Value={{#caprint:$class[Doc properties][Doc subject]}}
}}
</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=Doc properties |formfield=Doc target group |mwslot=ws-class-props}}
{{#tag:_edit ||target={{PAGEID}} |template=Doc properties |formfield=Doc parent |mwslot=ws-class-props}}
{{#tag:_edit ||target={{PAGEID}} |template=Doc properties |formfield=Subject version |mwslot=ws-class-props}}
{{#tag:_edit ||target={{PAGEID}} |template=Doc properties |formfield=Doc subject |mwslot=ws-class-props}}
|<_create mwwrite="{{FULLPAGENAME}}" mwtemplate="Doc properties" mwslot="ws-class-props" mwfields="Doc target group,Doc parent,Subject version,Doc subject" />
}}<!-- 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=Doc target group
|Value={{#cadefine:$value settings |User, Administrator, Developer, All }}
{{#cadefine:$values selected |{{#caprint:$class[Doc properties][Doc target group]}} }}
{{#camerge:$value options |$value settings |$values selected }}
{{#caunique:$value options}}
{{#tag:select
  |{{#camap:$value options |__Value__|{{#tag:input|__Value__|type=option|value=__Value__|selected={{#if:{{#casearch:$values selected|__Value__}}|selected}} }} |}}
  |name=Doc target group |required=required |class=form-control |id=doc_target_group-field |placeholder=select a value 
}}
}}
{{Sidebar item
|Label=Doc parent
|Value={{#tag:_token 
  |{{#caamap:{{#caprint:$class[Doc properties][Doc parent]}} |,|__Value__|{{#tag:input |{{#show:__Value__ |?Title}}|type=option|value=__Value__|selected=selected}} |}}
  |id=doc_parent-tokens
  |name=Doc parent[]
  |placeholder=Search...
  |multiple=
  |query=[[Title::!!!]]
  |limit=99999
  |returntext=Title
  }}
}}
{{Sidebar item
|Label=Subject version
|Value={{#tag:input ||type=text |name=Subject version |required=required |class=form-control |value={{#caprint:$class[Doc properties][Subject version]}} }}
}}
{{Sidebar item
|Label=Doc subject
|Value=<input type="textarea" name="Doc subject |required=required" class="form-control">{{#caprint:$class[Doc properties][Doc subject]}}</input>
}}

<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>