Last edited 4 months ago
by Monique Gähl

BlueSpice 4.3 and Manual:Extension/Workflows/Activity/SetTemplateParams: Difference between pages

(Difference between pages)
No edit summary
Tags: Manual revert 2017 source edit
 
No edit summary
 
Line 1: Line 1:
{{Featurepage|featured=true|featuredesc=BlueSpice 4.3 has been released. Read about the notable changes now.|featurestart=07/19/2023}}
==Description==
__TOC__
The ''SetTemplateParams'' activity allows automatic setting a template parameter on a wiki page.
==Releases==


{{#ask: [[Release::4.3]]
* Templates are accessed by the order of appearance on the page, starting at 0. Non-existing templates are counted as links, so they do not count in this list.
|?Releasepatch = Release
* Parameters inside the template can be specified by their name or the index in case of non-named parameters.
|?Releasedate#LOCL = Release date
* Index for non-named params starts at 1 (not 0!), as to be consistent with how template params are accessed in the template itself.
|mainlabel= -
* Nested templates are currently not supported.
|headers = plain
|sort=Releasedate
|order=desc
|default=There have been no patch releases so far.
}}


==Introduction==
== Profile ==
Release date: 06/29/2023   
{| class="wikitable"
 
! colspan="2" |'''Short profile'''
BlueSpice 4.3 is a minor release   
 
The code base was updgraded to '''MW 1.39.''' 
 
=== Compatibility ===
 
* supports '''PHP 8.2'''
* LDAP, Simple SAMLphp, OpenIDConnect : Upgraded to be compatible with '''PluggableAuth 6/7'''
 
==New Features==
{| class="wikitable" style="width:100%;"
!Feature
!Description
!Screenshot
|-
|-
! Content Droplets
|Name
|We are introducing  ''Content droplets'' as a convenient way to insert special content in a wiki page. This includes tags, parser functions, and templates. The feature replaces the "Magic words"  menu item of the Visual Editor.
|SetTemplateParams
 
 
{{Icon|bi bi-question-circle||#0d6efd|0.2em}} [[Manual:Extension/ContentDroplets|Content Droplets documentation]]
|[[File:droplet menu.png|link=https://en.wiki.bluespice.com/wiki/File:droplet%20menu.png|alt=screenshot of the Content droplets menu|center|thumb|450x450px|Content droplets]]
|-
|-
!Enhanced Menu Editor
|Async
|
|Yes
The main navigation can now contain hierarchical links. In addition, 4 configurations of the sidebar are possible.
 
{{Icon|bi bi-question-circle||#0d6efd|0.2em}}  [[Manual:Extension/MenuEditor|Menu Editor documentation]]
|[[File:Enhanced sidebar.png|center|thumb|320x320px|Enhanced Sidebar]]
|-
|-
!PDF Embed
|BPMN type
|It is now possible to embed a PDF viewer in wiki pages. It is contained in the Content Droplets menu for easy access.
|<code>bpmn:task</code>
 
 
 
{{Icon|bi bi-question-circle||#0d6efd|0.2em}}  [[Manual:Extension/ContentDroplets|Content Droplets documentation]]
|[[File:Extension PDFEmbed.png|alt=Screenshot of an embedded PDF file|center|thumb|450x450px|Extension PDFEmbed]]
|-
|-
!Startpage Templates
|BPMN Extension Element "wf:type"
|To support the creation of portal pages for the main page and for all other content namespaces, we now provide two startpage templates.
|<code>set_template_param</code>
 
|}
 
 
 


To further support users with the design of portal pages, the renowned icon library Font Awesome is now bundled with BlueSpice.
==Properties==
 
{| class="wikitable"
{{Icon|bi bi-question-circle||#0d6efd|0.2em}}  [[Manual:Extension/MenuEditor|Startpage Templates documentation]]
! style="vertical-align:middle;text-align:left;width:70px;" |'''Name of property'''
|<gallery widths="170" heights="200">
!'''Description'''
File:Startpage Intranet.png|alt=Screenshot of "Startpage Intranet"|Startpage template 1
!'''Type'''
File:Startpage Team.png|alt=Screenshot of "Startpage Team"|Startpage template 2
</gallery>
|-
|-
!Container Filter
|<code>title</code>
| You can now mark sections of a page for filtering and display a filter just for the content located within these sections of the page.
|Name of the page where the template parameter is changed. If it will be changed on the page where the workflow runs, the value is <code><nowiki>{{FULLPAGENAME}}</nowiki></code>
{{Icon|bi bi-question-circle||#0d6efd|0.2em}} [[Reference:ContainerFilter|Container Filter documentation]]
|string
|[[File:ContainerFilter example.png|alt=Screenshot of a filtered table|center|thumb|450x450px|Container filter]]
|}
 
==Additional improvements==
 
*VisualEditor: the copy and paste functionality out of other applications (e.g., MS Word) has been significantly improved.
*Tagging of page templates: Page templates can be categorized with tags in the Page template manager. The tags work as a filter when selecting page templates.
 
==Added extensions (8)==
{| class="contenttable" style="width:100%;"
|+
!Extension
!Description
!Developer
|-
|-
!ContainerFilter
| style="width:70px;" |<code>user</code>
|Allows to filter content elements within a page.
|User that is shown in the revision history
|Hallo Welt!
|user
|-
|-
!ContentDroplets
|<code>template-index</code>
|VisualEditor integration for inserting predefined content snippets
|Index of the template on the page (starting at 0)
|Hallo
|number
Welt!
|-
|-
!ContentStabilization
|<code>template- param</code>
|<span style="color: rgb(32, 33, 34)">Replaces the approval mechanism previously provided by the extensions FlaggedRevs / BlueSpiceFlaggedRevsConnector. The experience for the user should be seamless.</span>
|Parameter  to modify. This can be a string (in the case of a  named parameter) or a number (in case of a non-named param; starting from 1, accessor for the parameter)
|Hallo Welt!
|<nowiki>int|string</nowiki>
|-
|-
!FontAwesome
|<code>value</code>
|Provides a library of icons which can be used in conjunction with the Droplet "Icon"
|New value of the parameter, set by the workflow
|MediaWiki
|string
|-
|-
!InstanceStatus
|<code>minor</code>
|Allows to insert a header or footer (on a page basis or on a namespace basis) in the content area of ​​a page.
|Marks the revision as a minor edit if set to 1
|Hallo Welt!
|boolean
|-
|-
!PDFEmbed
|<code>revisionId</code>
|Media handler extension for PDF files.
|Sets a new page revision ID
|MediaWiki
|number
|-
|-
!PreToClip
|<code>timestamp</code>
|Copies contents of <code><nowiki><pre></nowiki></code> and <code><syntaxhightlight></code> tags into the clipboard.
|Sets the page revision timestamp
|MediaWiki
|timestamp
|-
|-
!SectionAnchors
|comment
|Adds a link to headings for copying the path to the clipbard.
|Comment that is shown in the revision history
|Hallo Welt!
|string
|}
|}


== Removed extensions (4)==
== Example ==
*'''FlaggedRevs:''' Replaced with extension ''ContentStabilization''
 
*'''BlueSpiceDrawioConnector:''' Inntegrated into exension  ''BlueSpiceDrawio''
=== Workflow task ===
*'''BlueSpiceFlaggedRevsConnector''': Replaced with extension ''ContentStabilization''
This workflow task will set the value of the parameter <code><nowiki>{{{status|not set}}}</nowiki></code> to <code>Updated</code> on a page's first template.<syntaxhighlight lang="xml">
*'''BlueSpiceInsertMagic:''' Replaced with extension ''ContentDroplet''
<bpmn:task id="EditTemplate" name="Edit template">
    <bpmn:extensionElements>
<wf:type>set_template_param</wf:type>
</bpmn:extensionElements>
<bpmn:property name="title" default="Testpage" validation="required,existing-title"/>
<bpmn:property name="user" default="WikiSysop" validation="existing-user"/>
<!-- Index of the template on page (starting from 0) -->
<bpmn:property name="template-index" default="0"/>
<!-- Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param) -->
<bpmn:property name="template-param" default="status"/>
<!-- New value to set -->
<bpmn:property name="value" default="Updated"/>
<bpmn:property name="minor" default="0"/>
 
<!-- Output properties -->
<bpmn:property name="revisionId"/>
<bpmn:property name="timestamp"/>
      <bpmn:incoming>Flow_1qh6vpl</bpmn:incoming>
      <bpmn:outgoing>Flow_0if1kyp</bpmn:outgoing>
 
    </bpmn:task>
</syntaxhighlight>


== Content changes ==
=== Template ===
The following content changes can affect the display of content in the wiki and may require manual adjustments:
The template content has the parameter <code><nowiki>{{{status}}}</nowiki></code> At the time of writing this, the workflow produced an error tif the parameter was wrapped in a <code><nowiki><div></nowiki></code> tag. Therefore, in the example below, the parameter is defined in a variable first. If the parameter is not in  a  <code>div</code> tag, using a variable is not necessary.<syntaxhighlight lang="text">
{{#vardefine:status|{{{status|not set}}}}}
<div style="background:#fbfaef;">Page status: {{#var:status}}</div>
</syntaxhighlight>


* Missing privacy pages can cause a yellow banner. This is only visible to the admin users.
=== Full bpmn example ===
* The start page templates may not be able to display all styles if templates contained therein already exist in the wiki before the update.
<syntaxhighlight lang="xml">
* Styles defined in templates or in MediaWiki:Common.css may no longer be applied.
<?xml version="1.0" encoding="UTF-8"?>
* The ContentDroplet icon can only be inserted in block mode.
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:wf="http://hallowelt.com/schema/bpmn/wf">
* Missing language switcher on pages whose title area is hidden.<br />
    <bpmn:process id="SetTemplateParams-Process" isExecutable="false">
        <bpmn:extensionElements>
            <wf:context>
                <wf:contextItem name="pageId"/>
            </wf:context>
        </bpmn:extensionElements>
        <bpmn:startEvent id="TheStart">
            <bpmn:outgoing>FromTheStartToEditTemplate</bpmn:outgoing>
        </bpmn:startEvent>
        <bpmn:sequenceFlow id="FromTheStartToEditTemplate" sourceRef="TheStart" targetRef="EditTemplate" />
        <bpmn:task id="EditTemplate" name="Edit template">
            <bpmn:extensionElements>
                <wf:type>set_template_param</wf:type>
            </bpmn:extensionElements>
            <bpmn:property name="title" default="" validation="required,existing-title">{{FULLPAGENAME}}</bpmn:property>
            <bpmn:property name="user" default="WikiSysop" validation="existing-user">WikiSysop</bpmn:property>
            <!-- Index of the template on page (starting from 0) -->
            <bpmn:property name="template-index" default="0"/>
            <!-- Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param) -->
            <bpmn:property name="template-param" default="status"/>
            <!-- New value to set -->
            <bpmn:property name="value" default="Super edited param"/>
            <bpmn:property name="minor" default="1"/>
            <!-- Output properties -->
            <bpmn:property name="revisionId"/>
            <bpmn:property name="timestamp"/>
            <bpmn:incoming>FromTheStartToEditTemplate</bpmn:incoming>
            <bpmn:outgoing>FromEditTemplateToTheEnd</bpmn:outgoing>
        </bpmn:task>
        <bpmn:sequenceFlow id="FromEditTemplateToTheEnd" sourceRef="EditTemplate" targetRef="TheEnd" />
        <bpmn:endEvent id="TheEnd">
            <bpmn:incoming>FromEditTemplateToTheEnd</bpmn:incoming>
        </bpmn:endEvent>
    </bpmn:process>
</bpmn:definitions>


{{Icon|bi bi-arrow-right-circle|||}} [[Known issues|More infos about the content changes]]
</syntaxhighlight>


[[de:BlueSpice 4.3]]
[[de:Handbuch:Erweiterung/Workflows/Activity/SetTemplateParams]]
[[en:{{FULLPAGENAME}}]]

Revision as of 12:42, 25 October 2023

Description

The SetTemplateParams activity allows automatic setting a template parameter on a wiki page.

  • Templates are accessed by the order of appearance on the page, starting at 0. Non-existing templates are counted as links, so they do not count in this list.
  • Parameters inside the template can be specified by their name or the index in case of non-named parameters.
  • Index for non-named params starts at 1 (not 0!), as to be consistent with how template params are accessed in the template itself.
  • Nested templates are currently not supported.

Profile

Short profile
Name SetTemplateParams
Async Yes
BPMN type bpmn:task
BPMN Extension Element "wf:type" set_template_param

Properties

Name of property Description Type
title Name of the page where the template parameter is changed. If it will be changed on the page where the workflow runs, the value is {{FULLPAGENAME}} string
user User that is shown in the revision history user
template-index Index of the template on the page (starting at 0) number
template- param Parameter to modify. This can be a string (in the case of a named parameter) or a number (in case of a non-named param; starting from 1, accessor for the parameter) int|string
value New value of the parameter, set by the workflow string
minor Marks the revision as a minor edit if set to 1 boolean
revisionId Sets a new page revision ID number
timestamp Sets the page revision timestamp timestamp
comment Comment that is shown in the revision history string

Example

Workflow task

This workflow task will set the value of the parameter {{{status|not set}}} to Updated on a page's first template.

<bpmn:task id="EditTemplate" name="Edit template">
    	<bpmn:extensionElements>
			<wf:type>set_template_param</wf:type>
		</bpmn:extensionElements>
		<bpmn:property name="title" default="Testpage" validation="required,existing-title"/>
		<bpmn:property name="user" default="WikiSysop" validation="existing-user"/>
		<!-- Index of the template on page (starting from 0) -->
		<bpmn:property name="template-index" default="0"/>
		<!-- Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param) -->
		<bpmn:property name="template-param" default="status"/>
		<!-- New value to set -->
		<bpmn:property name="value" default="Updated"/>
		<bpmn:property name="minor" default="0"/>

		<!-- Output properties -->
		<bpmn:property name="revisionId"/>
		<bpmn:property name="timestamp"/>
      <bpmn:incoming>Flow_1qh6vpl</bpmn:incoming>
      <bpmn:outgoing>Flow_0if1kyp</bpmn:outgoing>

    </bpmn:task>

Template

The template content has the parameter {{{status}}} At the time of writing this, the workflow produced an error tif the parameter was wrapped in a <div> tag. Therefore, in the example below, the parameter is defined in a variable first. If the parameter is not in a div tag, using a variable is not necessary.

{{#vardefine:status|{{{status|not set}}}}}
<div style="background:#fbfaef;">Page status: {{#var:status}}</div>

Full bpmn example

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:wf="http://hallowelt.com/schema/bpmn/wf">
    <bpmn:process id="SetTemplateParams-Process" isExecutable="false">
        <bpmn:extensionElements>
            <wf:context>
                <wf:contextItem name="pageId"/>
            </wf:context>
        </bpmn:extensionElements>
        <bpmn:startEvent id="TheStart">
            <bpmn:outgoing>FromTheStartToEditTemplate</bpmn:outgoing>
        </bpmn:startEvent>
        <bpmn:sequenceFlow id="FromTheStartToEditTemplate" sourceRef="TheStart" targetRef="EditTemplate" />
        <bpmn:task id="EditTemplate" name="Edit template">
            <bpmn:extensionElements>
                <wf:type>set_template_param</wf:type>
            </bpmn:extensionElements>
            <bpmn:property name="title" default="" validation="required,existing-title">{{FULLPAGENAME}}</bpmn:property>
            <bpmn:property name="user" default="WikiSysop" validation="existing-user">WikiSysop</bpmn:property>
            <!-- Index of the template on page (starting from 0) -->
            <bpmn:property name="template-index" default="0"/>
            <!-- Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param) -->
            <bpmn:property name="template-param" default="status"/>
            <!-- New value to set -->
            <bpmn:property name="value" default="Super edited param"/>
            <bpmn:property name="minor" default="1"/>
            <!-- Output properties -->
            <bpmn:property name="revisionId"/>
            <bpmn:property name="timestamp"/>
            <bpmn:incoming>FromTheStartToEditTemplate</bpmn:incoming>
            <bpmn:outgoing>FromEditTemplateToTheEnd</bpmn:outgoing>
        </bpmn:task>
        <bpmn:sequenceFlow id="FromEditTemplateToTheEnd" sourceRef="EditTemplate" targetRef="TheEnd" />
        <bpmn:endEvent id="TheEnd">
            <bpmn:incoming>FromEditTemplateToTheEnd</bpmn:incoming>
        </bpmn:endEvent>
    </bpmn:process>
</bpmn:definitions>



To submit feedback about this documentation, visit our community forum.

No categories assignedEdit

Discussions