Update manual 1.3.0

Technical migration 1.2.0 to 1.3.0

Changes have been made to the storage format so that links can be "typed" to create links to an external URL or a Ametys page.

After updating plugin and before starting the application for the first time, the file custom_nodetypes.xml (located in the <chemin_repository>/repository/nodetypes) must be deleted. The file will be automatically recreated when the server is restarted.

Then run the following script in the repository console, to set the "type" property on your existing links:

var qm = session.getWorkspace().getQueryManager();
var query = qm.createQuery("//element(*, ametys:directoryLink)", javax.jcr.query.Query.XPATH); 
var nodes = query.execute().getNodes();     

var count = 0;
while (nodes.hasNext())
    var node = nodes.next();

    if (!node.hasProperty('ametys-internal:url-type'))
        node.setProperty('ametys-internal:url-type', 'URL');

print(count + " links have been updated.");

Graphics migration 1.2.0 to 1.3.0

Links can now be external or internal.

If you have overloaded the XSL rendering services, you will need to take the new link type into account. In the input XML , the attribute urlType gives you the type of link and the attribute pageTitle gives you the title of the page in the case of an internal link.

Example of XML for an external link

<link id="directoryLink://f9706d93-c83e-44fb-b22b-e012d797a8fe" lang="fr" 
	  url="http://www.ametys.org/forum/" urlType="URL" 
	  title="Forum" content="" alternative="Forum Ametys"
	  pictureAlternative="" pictureType="external" picturePath="picture" pictureName="chat.png" pictureSize="4497" imagType="metadata" 
	  grantAnyUser="false" limitedAccess="false">

Example of XML for an internal link

<link id="directoryLink://f2124358-528c-4225-81bc-720bf73f9c8a" lang="fr" 
	  url="page://ffae5eeb-9630-4c32-afc4-39cd7584090b" urlType="PAGE" 
	  title="Services en ligne" content="" pageTitle="Mes services en ligne" alternative="Programme" 
	  pictureAlternative="" pictureType="external" picturePath="picture" pictureName="services.jpg" pictureSize="5150" imageType="metadata" 
	  grantAnyUser="false" limitedAccess="false">

For example:

     <xsl:when test="@urlType = 'PAGE'">
     	<a href="{resolver:resolve('page', @url)}" title="{@alternative}">
            	<xsl:when test="normalize-space(@title) != ''"><xsl:value-of select="@title"/></xsl:when>
                <xsl:otherwise><xsl:value-of select="@pageTitle"/></xsl:otherwise>
        	<a onclick="window.open(this.href); return false;" href="{@url}" title="{@alternative}">
                	<xsl:when test="normalize-space(@title) != ''"><xsl:value-of select="@title"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="@url"/></xsl:otherwise>
Back to top

Link directory