Access to a website or SVG object
You can access a website or SVG object via the source code of the object using can be accessed by THIS.
THIS
Functions of website and SVG objects
A website or SVG object provides a number of functions.
In order to use TAL in websites, the personalization in the website configuration must be activated.
getId
Returns the ID of the current website or SVG graphic.
Syntax
THIS/getId
Return value
Usage
<div tal:content="THIS/getId"> </div>
<div>23275968</div>
See also:
getName
Returns the internal name of the current website or SVG graphic.
Syntax
THIS/getName
Return value
Usage
<div tal:content="THIS/getName"> </div>
<div>Website 1</div>
See also:
getCategoryId
Returns the ID of the system folder where the current website or SVG graphic is located.
Syntax
THIS/getCategoryId
Return value
Usage
<div tal:content="THIS/getCategoryId"> </div>
<div>1667869</div>
See also:
getCategoryContent
Returns the objects located in a given system folder.
Syntax
THIS/getCategoryContent/<sorting>/<id>
Parameter
sorting = sorting order, permissible are "byLastModifiedDesc" for a sorting by processing date descending and "byDescription" for an alphabetical sorting by object name
id = ID of the given system folder
Return value
List of objects
Usage
<div tal:repeat="object THIS/getCategoryContent/byDescription/1667869" tal:content="object/getDescription"> </div>
<div>Name article 1</div>
<div>Name article 2</div>
<div>Name article 3</div>
<div>Name SVG graphic 1</div>
<div>Name Website 1</div>
See also:
getCurrentUser
Returns the profile of the visitor of the current website or SVG graphic.
Syntax
THIS/getCurrentUser
Return value
Usage
<div tal:content="THIS/getCurrentUser/getValues/NAME"> </div>
<div>Mustermann</div>
See also:
getBrowser
Returns the browser used to access the current website or SVG graphic.
Syntax
THIS/getBrowers
Return value
Usage
<div tal:content="THIS/getBrowser/getName"> </div>
<div>Chrome</div>
See also:
getSmartlink
Returns the smart link with the specified ID.
Syntax
THIS/getSmartlink/<id>
Return value
Usage
<a tal:repeat="link THIS/getSmartlink/23236717/getLinklist/getLinks" tal:content="link/getText" tal:attributes="href link/getLink" href="#"> </a>
<a href="https://scnem.com/slt.php?t=nozc8o.29sf3nf">Example link 1</a>
<a href="https://scnem.com/slt.php?t=nozce2.2nmrjj8">Example link 2</a>
<a href="https://scnem.com/slt.php?t=nozce3.9qrr0g">Example link 3</a>
See also:
getContainer
Returns the container with the specified ID.
Syntax
THIS/getContainer/<id>
Parameter
id = object ID of the container searched for
Return value
Usage
<div tal:content="THIS/getContainer/23099936/getAttributeByName/READMORE"> </div>
<div>read more</div>
See also:
getContentContainer
Returns the content container of the current SVG graphic. This function is not supported by the website object.
Syntax
THIS/getContentContainer
Return value
Usage
<text tal:content="THIS/getContentContainer/getAttributeByName/TEXT"> </text>
<text>Text aus dem Content-Container</text>
See also:
hasContentContainer
Indicates whether a content container is associated with the current SVG graphic. This function is not supported by the website object.
Syntax
THIS/hasContentContainer
Return value
Boolean
Usage
<div tal:condition="THIS/hasContentContainer">Content container is available</div>
<div tal:condition="not:THIS/hasContentContainer">Content container is not present</div>
<div>Content container is available</div>
<div>Content container is not present</div>