CMS Ametys provides integrators with numerous methods accessible from XSLT, facilitating the integration of graphic charters.
For more information, click here.
Add this code to the header of XSL files:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... xmlns:ugc="org.ametys.plugins.ugc.transformation.xslt.UgcXSLTHelper" ... extension-element-prefixes="... ugc ...">
So that you can call any function defined below, using "ugc:functionName(argument1, argument2)"
For example:
<xsl:variable name="ugcPage" select="ugc:getUgcPage(content/@id)"/>
From UGC 2.3.0
Description:
Returns the page identifier corresponding to the plugin UGC content:
Signature :
String getUgcPage(String contentId)
String getUgcPage(String contentId, String siteName)
Arguments:
Name |
Type |
Description |
---|---|---|
contentId |
String |
Content identifier from UGC |
Name |
Type |
Description |
---|---|---|
contentId |
String | Content identifier from UGC |
siteName | String | Site name. If null or signature without siteName parameter, current site will be taken. |
Example:
<xsl:value-of select="ugc:getUgcPage('defaultContent://abcd-1234-...')"/> <xsl:value-of select="ugc:getUgcPage('defaultContent://abcd-1234-...', 'my-site-name')"/>