Start page
Start page

Start page / Template development / Template syntax / System objects / #global / Page-specific

Page-related #global invocations

The demands made of a website are very many and diverse. For example, several websites are multi-lingual, others are monolingual. Several have several content areas - others only have one single one.

Page-related information and mechanisms are required for the display and linking of complex websites with multi-lingual pages and several content areas.

In FirstSpirit, the system object #global can be used to access site-related information (includes, among other things, pages, sections, page references, content areas, etc.).

The most important page-related invocations are listed in the following table:

Invocation

Meaning

Return data type

#global.gca("IDENTIFIER")

Insert the contents of a global page from Global Content Area .

GCAPage

#global.id

Returns the ID of the currently rendered node (e.g. page, section, etc.).

Long

#global.docgroup

Determines whether the current node is a document group or not.

Boolean
(Boolean value)

#global.node

Returns a page reference or a document group.

For the preview of a page reference from the Site Store: Returns the current page reference.
For the preview of a page from the Page Store: Returns the page reference for this page, which is found first, or the project's starting page reference, if the current page is not yet referenced.

With #global.node always the start page of a page group or of a content projection is returned. If the actual element of a content projection or a page group is to be returned, #global.ref should be used instead of.

Depending on the node:
DocumentGroup,
PageRef

#global.node.changeDate

Returns the change date of the page reference.

Date

#global.node.depth

Returns the depth of the page reference relative to the root node of the Site Store. The counting begins with 0 for the root node.

Integer

#global.node.editor

Returns the last editor of the page reference.

User

#global.node.editor.abbreviation

Returns the abbreviation of the last editor of the page reference.

String
(character string)

#global.node.editor.eMail

Returns the eMail address of the last editor of the page reference.

String
(character string)

#global.node.editor.phoneNumber

Returns the phone number of the last editor of the page reference.

String
(character string)

#global.node.editor.realname

Returns the name of the last editor of the page reference.

String
(character string)

#global.node.id

Returns the ID of the page reference.

Long

#global.node.keywords

Returns a list of all key words for the page reference. This list results from the union of sets of all key words defined in the Site Store along the tree structure (starting from the current page reference up to the root).

List<String>

#global.page

Returns the page from the Page Store.

Page

#global.page.body("IDENTIFIER")

Returns a content area.
The expression is frequently used to output the contents of the sections of a content area. The IDENTIFIER is to be specified as the identifier of a content area.

Body

#global.page.changeDate

Returns the change date of the page.
(See also #global.section.changeDate.)

Date

#global.page.depth

Returns the depth of the page relative to the root node of the Page Store. The counting begins with 0 for the root node.

Integer

#global.page.editor

Returns the last editor of the page.

User

#global.page.editor.abbreviation

Returns the abbreviation of the last editor of the page.

String
(character string)

#global.page.editor.eMail

Returns the eMail address of the last editor of the page.

String
(character string)

#global.page.editor.phoneNumber

Returns the phone number of the last editor of the page.

String
(character string)

#global.page.editor.realname

Returns the name of the last editor of the page.

String
(character string)

#global.page.id

Returns the ID of the page.

Long

#global.page.isTranslated

Determines whether, for the page in the current language, the attribute Page completely translated for this language is set.

Boolean
(Boolean value)

#global.page.isTranslated("IDENTIFIER")

Determines whether, for the page in the given language, the attribute Page completely translated for this language is set. The abbreviation of the language (e.g. EN) must be given as the identifier.

Boolean
(Boolean value)

#global.ref

Returns, similar to #global.node, the current page reference or a document group.

In contrast to the output with #global.node the output with #global.ref does not return the start page of a page group or of a content projection but the actually subordinated element, e.g. the actual page of a page group.

Depending on the node:
DocumentGroup,
PageRef

#global.section

Returns the section in a section template. If the current object is not a section, null is returned.

Section

#global.section.changeDate

Returns the change date of the section.
(Identical with the change date of the respective page, see also #global.page.changeDate.)

Date

#global.section.depth

Returns the depth of the section relative to the root node of the Page Store. The counting begins with 0 for the root node.

Integer

#global.section.editor

Returns the last editor of the section.

User

#global.section.editor.abbreviation

Returns the abbreviation of the last editor of the section.

String
(character string)

#global.section.editor.eMail

Returns the eMail address of the last editor of the section.

String
(character string)

#global.section.editor.phoneNumber

Returns the phone number of the last editor of the section.

String
(character string)

#global.section.editor.realname

Returns the name of the last editor of the section.

String
(character string)

#global.section.id

Returns the section's ID.

Long

#global.section.name

Returns the name of the section. Can be used to create manual references to automatically generated anchors.

String
(character string)

   

Examples

Several examples of use of the instruction within templates are shown in the following. The examples are intended to clearly show the specific effect of the instruction and provide help for the template developer when creating their own templates.

Important The examples displayed here must be adjusted for use within a project! For example, variable names must be changed to the specific variable names of the project in which the instruction is to be used.

1st Example: Output of the last editor

Last change on $CMS_VALUE(#global.page.changeDate.format("dd.MM.yyyy"))$ by $CMS_VALUE(#global.page.editor.realname)$

The example outputs the last change to the page formatted and the name of the editor.

Output:

Last change on 27.06.2007 by Mustermann

2nd Example: Language change

<a href="$CMS_REF(#global.ref, lang:"EN")$">Page in English</a>

The instruction $CMS_REF(...)$ is used to determine the URL of the actual node in another language.

Output:

<a href="/preview/671041/show/site/EN/current/671044/681046">Page in English</a>

3rd Example: Changing the presentation channel

<a href="$CMS_REF(#global.ref, templateSet:"print")$"Print version</a>

The instruction $CMS_REF(...)$ is used to determine the URL of the current node in another presentation channel.

Output:

<a href="/preview/671041/show/site/DE/current/671086/681046">Print version</a>

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2014-07-21