Start page
Start page
Start page

Start page / Template development / WebEdit / WebEdit format templates

The WebEdit format templates Available up to FirstSpirit Version 5.0

The WebEdit standard format templates can be installed and updated by the project administrator via the FirstSpirit server and project configuration. These format templates can then be referenced and used within the project templates. The WebEdit format templates are located in the Template Store in the "WebClient Format Templates" node:

Important The WebEdit standard format templates will no more be supported from FirstSpirit Version 5.0.

Usage of WebEdit format templates

The instruction $CMS_RENDER(...)$ is used within a template to integrate the content of a format template. The WebEdit format templates therefore have to be integrated within the required page and section templates using $CMS_RENDER(...)$:

$CMS_RENDER(template:"TEMPLATE", OPTIONS)$
Important For further information see Chapter about the $CMS_RENDER(...)$ instruction and Chapter Format templates.

Important When using templates, note that WEBeditIncludeJS must be used in the <HEAD> area of each the project's page templates!

WEBeditBarIncludeJS

WEBeditBarIncludeJS is used to make the WebEdit function "Quick Edit" availalbe to a page. The WEBeditBarIncludeJS template must be used in each page template of the project in which "Quick Edit" is to be used. In addition, each page template must contain WEBeditIncludeJS.

$CMS_RENDER(template:"WEBeditIncludeJS")$
$CMS_RENDER(template:"WEBeditBarIncludeJS")$

Important Weitere Informationen zu WEBeditBarIncludeJS siehe Kapitel Quick-Edit.

WEBeditEditAttribute

WEBeditEditAttribute requires the mandatory parameter name for specifying the input components (e.g. "st_text"). In addition, the parameter tooltip can be used to assign an alternative tooltip.

$CMS_RENDER(template:"WEBeditEditAttribute",name:"st_subheadline")$

Special case: CMS_INPUT_CONTENTAREALIST and FS_LIST

When using the input component CMS_INPUT_CONTENTAREALIST and FS_LIST it is essential to ensure that the WebEdit icons are not output for the sections which are filled in this input component, i.e. the WebEdit icons of the sections inserted into the Contentarealist or FS_LIST must not be displayed. This applies for all render format templates which allow editing on attribute level:

Case A: Outputting content using $CMS_VALUE(...)$
If the content of the input components CMS_INPUT_CONTENTAREALIST and FS_LIST are output by means of a $CMS_VALUE(...)$ instruction, the respective control elements (e.g. the Quick Edit bar on section level) are suppressed automatically. For example:

$CMS_VALUE(IDENTIFIER_INPUT_COMPONENT)$

Case B: Outputting content by means of $CMS_FOR(...)$ / $CMS_VALUE(...)$:
If contents are manually output by means of a $CMS_FOR(...)$- / $CMS_VALUE(...)$ instruction the control elements must be suppressed manually in the template.

For this purpose the following $CMS_SET(...)$ instruction should be inserted in the HTML channel before the output of the single sections of the input component by means of the $CMS_FOR(...)$ instruction:

$CMS_SET(gv_void, #global.context.setVariableValue("#sectionList", IDENTIFIER_INPUT_COMPONENT))$

This will define the missing variable "#sectionList" and fill in the context oriented data form the input component so that the WebEdit format templates are evaluated correctly even in this special case.

The variable must be deleted again after the output so that the control elements are output in the following sections again:

$CMS_SET(gv_void, #global.context.removeVariable("#sectionList"))$

Example HTML channel:

$CMS_RENDER(template:"WEBeditInplaceEdiBegin")$
$CMS_SET(gv_void, #global.context.setVariableValue("#sectionList", IDENTIFIER_INPUT_COMPONENT))$
$CMS_FOR(section, IDENTIFIER_INPUT_COMPONENT)$
$CMS_VALUE(section)$
$CMS_END_FOR$
$CMS_SET(gv_void, #global.context.removeVariable("#sectionList"))$
$CMS_RENDER(template:"WEBeditInplaceEditEnd")$

Mandatory parameters

Parameter

Description / example

name

Name of the GUI component ("name" attribute of the <CMS_INPUT_...> component), e.g. name:"st_text" or name:"st_headline"

   

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip: “Edit headline“

   

WEBeditEditContent

WEBeditEditContent enables the editing of a dataset and does not require any mandatory parameters. The optional the parameter tooltip can be used to assign an alternative tooltip.

The UID of the table template and the ID of the currently rendered data record are normally used. The optional parameter content can be used to change the default UIDss of the table template used ($CMS_VALUE(ContentName)$). The optional parameter index can be used to change the default data record ID used ($CMS_VALUE(#row.getId())$).

$CMS_RENDER(template:"WEBeditEditContent")$

Important Notes about the use of the input components CMS_INPUT_CONTENTAREALIST and FS_LIST see above.

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip: "Edit headline"

content

Specification of the Uid of the table template,
e.g. content:"glossar.glossary"

index

Specification of the data record ID in the schema,
e.g. index: "128" or index:#row.getId()

   

WEBeditEditSectionAttributes

WEBeditEditSectionAttributes provides the function for editing all input components of a section and does not require any mandatory parameters. The optional the parameter tooltip can be used to assign an alternative tooltip.

$CMS_RENDER(template:"WEBeditEditSectionAttributes")$

Important Notes about the use of the input components CMS_INPUT_CONTENTAREALIST and FS_LIST see above.

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip: "Edit headline"

   

WEBeditScripts

WEBeditScripts enables the display of up to three script buttons in the WebEdit toolbar.

The optional parameters script1 to script3 are used to transfer a character string of parameters which define which parameters are to be taken into account for the script. Within this character string the key and value are separated by the equals sign ("=") and a key/value pair is separated by the "&" symbol. There is NO "&" symbol in front of the first key/value pair. scriptTooltip1 to scriptTooltip3 are used to indicate the tooltips for the buttons in the WebEdit toolbar, for example "Execute script":

$CMS_RENDER(template:"WEBeditScripts"
[,script1:"PARAMETER",scriptTooltip1:"TOOLTIP"]
[,script2:"PARAMETER",scriptTooltip2:"TOOLTIP"]
[,script3:"PARAMETER",scriptTooltip3:"TOOLTIP"])$

In WebEdit the keys script, id, store and templateset are evaluated in a parameter character string, whereby script
is a mandatory key and must contain the unique name of the script to be executed. Other keys are made available to the script context.
With templateset, either the name or the number of the script's presentation channel must be given. The id and store keys indicate in which store (e.g. store=mediastore) and on which node (e.g. id=12345) the script is to be executed. These two keys must always be given together.

Example:

$CMS_RENDER(template:"WEBeditScripts",script1:"script=myTestScript&templateset=html&store=mediastore&id=23456&parameter1=value1"

In the example, the content of the script's "html" channel with the unique name “myTestScript”, is executed in the Media Store on the node with the ID "23456". The parameter parameter1 is available in the script context with the value value1.

Optional parameters

Parameter

Description / example

script1

Specification of the parameter URL for the first script button, e.g. script1:“script=myScript“

scriptTooltip1

Tooltip for the first script button in the WebEdit toolbar, e.g. scriptTooltip1:“My 1st script“

script2

Specification of the parameter URL for the second script button, e.g. script2:“script=myScript“

scriptTooltip2

Tooltip for the first script button in the WebEdit toolbar, e.g. scriptTooltip2:“My 2nd script“

script3

Specification of the parameter URL for the third script button, e.g. script3:“script=myScript“

scriptTooltip3

Tooltip for the first script button in the WebEdit toolbar, e.g. scriptTooltip3:“My 3rd script“

   

Parameter URL

Parameter

Description / example

script=VALUE

Specification of the unique name of the script to be executed,
e.g. script=myScript

templateset=VALUE

Specification of the presentation channel of the script to be executed, either via the channel number or the channel name,
e.g. templateset=0 or templateset=html

store=VALUE&id=VALUE

ID and store of the node on which the script is to be executed,
e.g. store=mediastore&id=23884

NAME=VALUE

Other variables, which are to be made available in the script context,
e.g. date=03.04.2005&editor=John

   

WEBeditSelectPicture

WEBeditSelectPicture provides the function for editing a picture and has the same mandatory and optional parameters as WEBeditEditAttribute: name for the name of the input component and tooltip as an optional parameter.

$CMS_RENDER(template:"WEBeditSelectPicture",name:"st_picture")$

Important Notes about the use of the input components CMS_INPUT_CONTENTAREALIST and FS_LIST see above.

Mandatory parameters

Parameter

Description / example

name

Name of the GUI component ("name" attribute of the <CMS_INPUT_...> component), e.g. name:"st_picture"

   

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip: "Edit picture“

   

WEBeditIncludeJS

WEBeditIncludeJS is used to make the WebEdit standard functions available in a page, therefore the parameter must be used in each page template of a project.

$CMS_RENDER(template:"WEBeditIncludeJS")$

WEBeditQuickBar

WEBeditQuickBar is used to add the Quick Edit bar at page/section level. WEBeditQuickBar has no mandatory parameters. The following optional parameters can be specified: barOrientation, highlightContainer, highlightClass, extended, wfNew, wfChanged, wfDelete and wfForce. barOrientation is used to specify the fold-out direction of the Quick Edit bar. hightlightContainer and highlightClass define an area to be highlighted and assign a CSS class to it. extended can be used to affect the initial fold-out behaviour of the Quick Edit bar (folded out/extended or folded up/retracted). The parameters wfNew, wfChanged and wfDelete are used to define the recommended workflows for the object status. wfForce can be used to force execution of a recommended workflow.

$CMS_RENDER(template:"WEBeditQuickBar",barOrientation:"left",highlightContainer:"hc" + #global.page.id)$

Important Further information about WEBeditQuickBar see Chapter Quick-Edit.
Important Notes about the use of the input components CMS_INPUT_CONTENTAREALIST and FS_LIST see above.

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip:"Edit"

barOrientation

Specification of the fold-out direction of the Quick Edit bar. If the value „left“ is specified, the Quick Edit bar is folded out (dropped down) to the left, if „right“ " is specified it folds out to the right,
e.g. barOrientation:"left"
If no parameter is specified the Quick Edit bar folds out to the right.

extended

Specification of the initial fold-out behaviour of ONE Quick Edit bar on a preview page,
e.g. extended:“true“.
„true“ means dropped down and „false“ means folded up. If the parameter is not specified the Quick Edit bar is folded up. The parameter can only be used once per page.

highlightContainer

ID of the element whose content is to be especially highlighted,
e.g. highlightContainer:“absatz1“
Examples:

  • highlightContainer: "hc" + #global.id
  • highlightContainer: "hc" + #global.page.id
  • highlightContainer: "hc" + #global.section.id

highlightClass

Specification of a CSS class which is to be used for the element which as specified with highlightContainer. . If no CSS class is specified, the standard CSS class „weHighlight” is used.
Examples:

  • highlightClass: "weContainer"
  • highlightClass: "layout"

wfNew

Name of the recommended workflow for "new" status,
e.g. wfNew:"Release request"

wfChanged

Name of the recommended workflow for "changed" status, e.g. wfChanged:"Release request"

wfDelete

Name of the recommended workflow for "Delete" status,
e.g. wfDelete:"Delete"

wfForce

Force execution of the recommended workflow for a status. „true“ means force execution, „false“ means execution is not forced. If the parameter is not specified, the execution is not forced,
e.g. wfForce:"true" or wfForce:"false"

disableButtons

Specification of Quick Edit bar buttons (at page level), which are to be concealed in the bar. At present, hiding the buttons using the attribute disableButtons is only possible for the "Create Page" (disableButtons:"newpage") and „Extras“ (disableButtons:"extras"). The two parameters can also be specified combined,
e.g. disableButtons:"newpage,extras"
These buttons are no longer displayed when the Quick Edit bar is opened.

   

WEBeditSwitch

The format template WEBeditSwitch can be used to realise a jump into a WebEdit preview page („DeepLink“) from a page which is not a preview page.

$CMS_RENDER(template:"WEBeditSwitch",guiLanguage:"DE",login:"User_A",password:"PW_A")$

Important The format template WEBeditSwitch2 provides additional methods for authentification and should be used preferably.

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip:"Show page"

guiLanguage

Specification of a valid interface language which is to be used for WebEdit,
e.g.guiLanguage:"DE"

login

Specification of a valid user name for authentication in the WebClient,
e.g. login:"User_A"

password

Specification of a valid password for authentication in the WebClient,
e.g. password:“PW_A“

   

WEBeditSwitch2

The format template WEBeditSwitch2 can be used to realise a jump into a WebEdit preview page ("DeepLink") from a page which is not a preview page. Unlike WEBeditSwitch, apart from the conventional authentication ("plain"), other authentication methods can also be used (e.g. authentication using SAP ticket).

$CMS_RENDER(template:"WEBeditSwitch2",guiLanguage:"EN",login:"plain",user:"User_A",password:"PW_A")$

Optional parameters

Parameter

Description / example

tooltip

Specification of a different tooltip for the display when the cursor is moved over the link,
e.g. tooltip:"Go to"

guiLanguage

Specification of a valid interface language which is to be used for WebEdit,
e.g. guiLanguage:"EN"

user

Specification of a valid user name for authentication in the WebClient,
e.g. user:"User_A"

login

Specification of a valid authentication procedure for authentication in the WebClient,
e.g. login:"ticket"
Other login options:

  • plain: Plain text authentication
  • hash: Base64 authentication
  • ticket: Authentication using SAP ticket

ticket

Specification of a ticket for SAP authentication. The "ticket" parameter is only required if the authentication method ticket is defined for the parameter login.

password

Specification of a valid password for authentication in the WebClient,
e.g. password:“PW_A“

   

© 2005 - 2012 e-Spirit AG | All rights reserved. | Last change: 03.02.2011