Start page
Start page

Start page / Template development / Forms / Input components (deprecated) / PAGEREF

CMS_INPUT_PAGEREFAvailable up to FirstSpirit Version 5.0

Contents
for example
to the methods: ElementReference

CMS_INPUT_PAGEREF

The CMS_INPUT_PAGEREF input element is used to enter links to page references from the Site Store on a page or a section in the Page Store. The required page reference can be simply selected by the editor from the displayed site tree of the Site Store.

The input component can be enhanced by the template developer to include the option to link to a specific section in the page. In this case a pull-down list is also displayed in the component for selection of the section.

Unlike the link input via the input component CMS_INPUT_LINK it is not possible to select any different types of links here via a link template and it is also not possible for the template developer to specify any formatting. The selection of the required page reference from the Site Store by the editor only returns the input pageref:name_of the_reference.

Access-API example use case
The exemplary implementation PageRefEditorValueExample shows some simple examples of use for the reading, writing and creating access to the data object (PageRefEditorValue) and its inner data container (ElementReference) of the input component by means of the FirstSpirit Access-API.

Important Some of the indicated parameters are not relevant for this input component (see below) because at the moment no upload functionality is implemented for it. However, the parameters are indicated here for technical reasons.
name
Designator
Mandatory
allowEmpty
YesNo
Optional parameter
convertEntities
ConvertEntity
Optional parameter
hFill
YesNo
Optional parameter
hidden
YesNo
Optional parameter
mediaStore
YesNo
Optional parameter
noBreak
YesNo
Optional parameter
preset
Preset
Optional parameter
sections
PageRefMode
Optional parameter
sortOrder
SortOrder
Optional parameter
useLanguages
YesNo
Optional parameter
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameter
label
String
Optional parameter
name
String
Mandatory
autoReleaseAfterUpload
YesNo
Optional parameter
uploadFolder
String
Optional parameter
name
String
Mandatory
store
String
Optional parameter
name
String
Mandatory
name
String
Mandatory
store
String
Mandatory
name
String
Optional parameter
uploadFolder
String
Optional parameter
name
String
Mandatory
store
String
Optional parameter

Parameter

The following table gives the parameters of the PAGEREF input component.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone
allowEmptyNo3.0YesNoYES
convertEntitiesNo2.0ConvertEntityNONE
hFillNo2.0YesNoYES
hiddenNo4.0.44YesNoNO
mediaStoreNo2.0YesNoNO
noBreakNo2.0YesNoNO
presetNo4.0PresetDEFAULT
sectionsNo2.0PageRefModePAGE
sortOrderNo4.0SortOrderKEEP_ORDER
useLanguagesNo2.0YesNoYES

name

The attribute "name" is the variable name of an input component with which the the result object of the input component can be used in the templates - with the help of $CMS_VALUE()$ - or the content can be output.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone

allowEmpty

The "allowEmpty" parameter is used to specify whether a value has to be entered for an input value or not.

If allowEmpty="YES" input is not mandatory; however, it is if allowEmpty="NO".

Input components with allowEmpty="NO" are also called mandatory input components.

The default value for allowEmpty is YES.

ParameterMandatorySinceTypeDefault value
allowEmptyNo3.0YesNoYES

convertEntities

The "convertEntities" attribute is used to convert special characters entered in the input components for output in HTML characters.

There are three forms:

  • convertEntities="NONE" (standard)
  • convertEntities="STANDARD"
  • convertEntities="QUOTE"

With the NONE form, no conversion rules whatsoever are applied.

If STANDARD is given the conversion rules in the "convert" area of the selected conversion rule of the presentation channel are applied.

The form QUOTE explicitly includes STANDARD too. However, the "quote" area of the conversion rule is also applied.

ParameterMandatorySinceTypeDefault value
convertEntitiesNo2.0ConvertEntityNONE

hFill

An input component is always displayed with a pre-defined width.

However, if the input component is to use the full available display width the parameter hFill must be given with the value YES .

ParameterMandatorySinceTypeDefault value
hFillNo2.0YesNoYES

hidden

With the "hidden" parameter an input component can be hidden from the editor.

If hidden="YES" the input component is not visible for the editor, if hidden="NO" it is visible.

The default value for hidden is NO.

ParameterMandatorySinceTypeDefault value
hiddenNo4.0.44YesNoNO

mediaStore

As a default it is only possible to select page references in a PAGEREF input component.

The mediaStore parameter enables media to be selected from the media store too.

To this end the mediaStore parameter must be given with the value YES (...mediaStore="YES"...) .

ParameterMandatorySinceTypeDefault value
mediaStoreNo2.0YesNoNO

noBreak

The noBreak parameter can be used to suppress automatic line break after an input component.

The noBreak parameter must be given with value "YES" (noBreak="YES") to suppress the automatic line break.

ParameterMandatorySinceTypeDefault value
noBreakNo2.0YesNoNO

preset

Using the preset attribute the handling of default values in an input component can defined (see also chapter Default values). If preset="default" is set, the retrieval value defined in the form is used. If this value in the form is changed later on, these changes will be affect all usages of this default value in the input components maintained by the editor, as long as a value will be set manually in the input component. This is the default setting. If preset="copy" is set, the value entered by the editor is copied directly into the input component. Subsequent changes to the default value in the form do not have any effect on the usages of this default value in the input components maintained by the editor.

ParameterMandatorySinceTypeDefault value
presetNo4.0PresetDEFAULT

sections

The sections parameter can be used to influence or define the behaviour of the reference selection.

As a default, page references only can be selected in the PAGEREF input component.

By specifying BOTH as the value for the parameter it is also possible to select the destination section.

When specifying a SECTION it is only possible to select from sections on the current page.

ParameterMandatorySinceTypeDefault value
sectionsNo2.0PageRefModePAGE

sortOrder

The sortOrder parameter can be used to influence the sort order of the entries in the input component.

Three key terms can be used for the parameter:

  • sortOrder="KEEP_ORDER" (standard)
  • sortOrder="ASCENDING"
  • sortOrder="DESCENDING"

With KEEP_ORDER the given order of the entries is retained.

With the value ASCENDING the entries are alphabetically sorted in ascending order and with DESCENDING they are alphabetically sorted in descending order.

ParameterMandatorySinceTypeDefault value
sortOrderNo4.0SortOrderKEEP_ORDER

useLanguages

The useLanguages parameter can be used to specify whether or not an input component is to store different or deviating values for different languages (multi-lingual maintenance).

If the parameter is not given, deviating values are stored for the different languages as a default.

If NO (...useLanguages="NO") is specified, one value is stored for all languages.

ParameterMandatorySinceTypeDefault value
useLanguagesNo2.0YesNoYES

LANGINFOSAvailable from FirstSpirit Version 4.0

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see View document FirstSpirit Manual for Administrators, Chapter "Language templates") to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to give a description which is used to display a tool tip (mouse-over).

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

The label parameter is used to give the surface labelling for input and visualisation components.

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone

PROJECTSAvailable from FirstSpirit Version 4.2

The tag PROJECTS can be used to define the projects (local and/or remote) from which references are allowed to be selected.

Remote projects are specified usind the tag REMOTE, using the tag CATEGORY one or more remote category/categories can be defined. The actual project is specified by the tag LOCAL. Any number of projects can be defined here.

Moreover, for each project the tags SOURCES and FOLDER can be given. They define from which folders a reference is allowed to be selected.

The sorting of the project definitions has an impact on the order of projects in the selection and in the upload dialogue (the local project is excepted from this sorting).

Important For restrictions of using remote media in the WebEdit mode please see page Restrictions.

REMOTE

Using this tag one or more remote projects can be defined which is/are to be taken into account. For each remote project one REMOTE tag must be given.

Important A valid licence for the Remote media access is required to be able to use the REMOTE tag.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone
autoReleaseAfterUploadNo4.2YesNoNone
uploadFolderNo4.2StringNone

name

Using the parameter name the symbolic name of the remote project is specified.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

autoReleaseAfterUpload

This parameter is not relevant for this input component because at the moment no upload functionality is implemented for it.

ParameterMandatorySinceTypeDefault value
autoReleaseAfterUploadNo4.2YesNoNone

uploadFolder

This parameter is not relevant for this input component because at the moment no upload functionality is implemented for it.

ParameterMandatorySinceTypeDefault value
uploadFolderNo4.2StringNone

SOURCESAvailable from FirstSpirit Version 4.2

The SOURCES tag can be used to limit the selection or display to defined folders (including sub-folders).

SOURCES is a positive list, i.e. only the given folders are allowed.

To allow a folder, a FOLDER tag must be specified for each.

FOLDERAvailable from FirstSpirit Version 4.2

The FOLDER tag is used to specify a folder which is to be taken into account.

When specifying a FOLDER the name parameter must be given with a valid folder name.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone
storeNo4.2Stringsitestore

name

A valid folder name must be given for the name parameter. To allow the complete store the value root is to be given:

<FOLDER name="root">

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

store

Using the parameter store a store can be specified for being selected. By default, only the Site Store can be used for this input component:

...store="sitestore"...

If the parameter mediaStore is set to yes, the Media Store will be displayed additionally. In this case, using store="mediastore" and a valid folder name for the parameter name a folder from the Media Store can be defined for selection. Regardless of whether only a folder from the Media Store is defined for selection, the Site Store is displayed for being selected at any rate.

ParameterMandatorySinceTypeDefault value
storeNo4.2Stringsitestore

CATEGORY

Using CATEGORY one or more remote categorie/s can be defined. For each category one CATEGORY tag must be given.

If a remote category contains already defined remote projects these projects from the category will be ignored.

Moreover, for each project the tags SOURCES and FOLDER can be given. They define from which folders a reference is allowed to be selected. All folders from the projects of the given remote category defined via CATEGORY are taken into account, which have the name defined by name attribute in the FOLDER tag. I.e. if the folder name specified by the name attribute exists only in one project of the remote category, only this folder will be shown in the selection dialogue. If the folder name exists in several projects, the folders of all concerned projects are shown in the selection dialogue.

Important A valid licence for the Remote media access is required to be able to use the CATEGORY tag.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

name

A valid name of a remote category must be given for the name parameter.

Important If two or more REMOTE or CATEGORY tags with the same name are given, only the first definition will be taken into account.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

SOURCESAvailable from FirstSpirit Version 4.2

The SOURCES tag can be used to limit the selection or display to defined folders (including sub-folders).

SOURCES is a positive list, i.e. only the given folders are allowed.

To allow a folder, a FOLDER tag must be specified for each.

FOLDERAvailable from FirstSpirit Version 4.2

The FOLDER tag is used to specify a folder which is to be taken into account.

When specifying a FOLDER the name parameter must be given with a valid folder name as well as the store parameter with a valid name of the respective store.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone
store*Yes4.2StringNone

name

A valid folder name must be given for the name parameter. To allow the complete store the value root is to be given:

<FOLDER name="root">

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

store

The name of the store must be specified by the parameter store. By default, only the Site Store can be used for this input component:

...store="sitestore"...

If the parameter mediaStore is set to yes, the Media Store will be displayed additionally. In this case, using store="mediastore" and a valid folder name for the parameter name a folder from the Media Store can be defined for selection. Regardless of whether only a folder from the Media Store is defined for selection, the Site Store is displayed for being selected at any rate.

ParameterMandatorySinceTypeDefault value
store*Yes4.2StringNone

LOCAL

This tag must be used for specifying the local project if the Tag PROJECTS is given.

ParameterMandatorySinceTypeDefault value
nameNo4.2StringNone
uploadFolderNo4.2StringNone

name

The parameter name must be used for defining the name of the local project. By default, a . (dot) must be used for this:

<LOCAL name=".">

ParameterMandatorySinceTypeDefault value
nameNo4.2StringNone

uploadFolder

This parameter is not relevant for this input component because at the moment no upload functionality is implemented for it.

ParameterMandatorySinceTypeDefault value
uploadFolderNo4.2StringNone

SOURCESAvailable from FirstSpirit Version 4.2

The SOURCES tag can be used to limit the selection or display to defined folders (including sub-folders).

SOURCES is a positive list, i.e. only the given folders are allowed.

To allow a folder, a FOLDER tag must be specified for each.

FOLDERAvailable from FirstSpirit Version 4.2

The FOLDER tag is used to specify a folder which is to be taken into account.

When specifying a FOLDER the name parameter must be given with a valid folder name.

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone
storeNo4.2Stringsitestore

name

A valid folder name must be given for the name parameter. To allow the complete store the value root is to be given:

<FOLDER name="root">

ParameterMandatorySinceTypeDefault value
name*Yes4.2StringNone

store

Using the parameter store a store can be specified for being selected. By default, only the Site Store can be used for this input component:

...store="sitestore"...

If the parameter mediaStore is set to yes, the Media Store will be displayed additionally. In this case, using store="mediastore" and a valid folder name for the parameter name a folder from the Media Store can be defined for selection. Regardless of whether only a folder from the Media Store is defined for selection, the Site Store is displayed for being selected at any rate.

ParameterMandatorySinceTypeDefault value
storeNo4.2Stringsitestore
Key

LanguageAbbreviation

Language abbreviation, e.g. DE, EN, FR or * for return values

PageRefMode

Switch to define the selection behaviour

PAGEAvailable from FirstSpirit Version 2.0

Page references only can be selected

BOTHAvailable from FirstSpirit Version 2.0

Page references and sections can be selected

SECTIONAvailable from FirstSpirit Version 2.0

Sections from the current page only can be selected

YesNo

Switch to apply an attribute or not

NOAvailable from FirstSpirit Version 2.0

Do not apply attribute

YESAvailable from FirstSpirit Version 2.0

Apply attribute

String

A random character string

SortOrder

Switch with which to define the sort order of the entries

KEEP_ORDERAvailable from FirstSpirit Version 3.0

Retain the sort order of the entries

ASCENDINGAvailable from FirstSpirit Version 3.0

Sort entries alphabetically in ascending order

DESCENDINGAvailable from FirstSpirit Version 3.0

Sort entries alphabetically in descending order

Preset

Define the general preset modes.

DefaultAvailable from FirstSpirit Version 4.0

Retrieve default from definition, if no value is set.

CopyAvailable from FirstSpirit Version 4.0

Copy default from definition and save automatically.

ConvertEntity

Switch with which to define the conversion rule

NONEAvailable from FirstSpirit Version 2.0

Do not use any conversion rules

STANDARDAvailable from FirstSpirit Version 2.0

Use the conversion rules of the "convert" area

QUOTEAvailable from FirstSpirit Version 2.1

Use the conversion rules of the "convert" and "quote" area

Designator

Unique identifier of variable length; must start with a letter or underscore and may only contain the characters "A-Z", "a-z", "0-9" and "_", e.g. "fr_st_varName"

Example

An example of the input component "CMS_INPUT_PAGEREF":

<CMS_INPUT_PAGEREF useLanguages="YES" name="IDENTIFIER">
<LANGINFOS>
<LANGINFO lang="*" label="TEXT" description="TEXT"/>
<LANGINFO lang="DE" label="TEXT" description="TEXT"/>
<LANGINFO lang="EN" label="TEXT" description="TEXT"/>
</LANGINFOS>
</CMS_INPUT_PAGEREF>

Example of use in the template syntax

The resolution of the selected page reference could look like this:

$CMS_IF(!st_pageref.isEmpty)$
<a href="$CMS_REF(st_pageref)$">linktext</a><br>
$CMS_END_IF$

© 2005 - 2014 e-Spirit AG | All rights reserved. | Last change: 2013-05-24