CMS Ametys provides integrators with numerous methods accessible from XSLT, facilitating the integration of graphic charters.

For more information, click here.

  1. How to use these methods
  2. Reference
    1. getUgcPage

 

How to use these methods

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)"/>

Reference

getUgcPage

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
siteNameStringSite 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')"/>       
Back to top