This page should only be applied if the assisted migration script asks you to pass the manual migration code.20250718.INTRANETCARDS.InternalLinks
From version 1.33.0 onwards, the Intranet Cards charter supports internal links/applications.
A directory link is "internal" as soon as an IP address range is defined in the "IP restriction" site parameter of the "Link directory" category and an internal url , and only an internal url , is defined for a link.
Outside the internal IP range, the link must therefore be inactive. Inactive links are saxed with the "disabled" attribute.
Until now, these links were not managed by the graphic charter. This is now the case with the following rules:
for notifications or quick access do not appear for business applications, HR, favorites, ... configurable the links are present but are grayed out, not clickable, without hover style and with a tooltip "This link is inaccessible". This migration is recommended but not mandatory if the notion of internal link is not used.
If you've landed on this page, it's because your charter overloads at least one of the following XSL templates:
<xsl:template name="notification-links"> <xsl:template name="lateral-menu"> <xsl:template match="link" mode="config"> For the first 2, the migration is very simple, it consists in filtering links on the "disabled" attribute. For example, replace:
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link" mode="top-links"> <xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link" mode="top-links">
<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link" mode="top-links"> by
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link[not(@disabled)]" mode="top-links"> <xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link[not(@disabled)]" mode="top-links">
<xsl:apply-templates select="/cms/inputData/linkDirectory[@id='topMenu']/links/link[not(@disabled)]" mode="top-links"> The href, title and target attributes are now handled in three separate templates:
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/> <xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/>
<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/> The disabled nature of links is handled in these templates. The calculation of href, title and target must therefore be replaced by a call to these templates:
Oops! Copy to clipboard failed. Open the code and copy it manually.<li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}" title="{@alternative}">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@urlType = 'PAGE'">
<xsl:value-of select="resolver:resolve('page', @url)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@urlType != 'PAGE'"><xsl:attribute name="target">_blank</xsl:attribute></xsl:if>
<!-- [...] -->
</a>
</li> <li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}" title="{@alternative}">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@urlType = 'PAGE'">
<xsl:value-of select="resolver:resolve('page', @url)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@urlType != 'PAGE'"><xsl:attribute name="target">_blank</xsl:attribute></xsl:if>
<!-- [...] -->
</a>
</li> Voir le code
<li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}" title="{@alternative}">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@urlType = 'PAGE'">
<xsl:value-of select="resolver:resolve('page', @url)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@urlType != 'PAGE'"><xsl:attribute name="target">_blank</xsl:attribute></xsl:if>
<!-- [...] -->
</a>
</li> becomes
Oops! Copy to clipboard failed. Open the code and copy it manually.<li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<xsl:if test="@disabled = 'true'">
<xsl:attribute name="data-app-disabled">true</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}">
<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/>
<!-- [...] -->
</a>
</li> <li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<xsl:if test="@disabled = 'true'">
<xsl:attribute name="data-app-disabled">true</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}">
<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/>
<!-- [...] -->
</a>
</li> Voir le code
<li class="ametys-tools-list__item">
<xsl:choose>
<xsl:when test="$extra"><xsl:attribute name="data-extra-list-item"></xsl:attribute></xsl:when>
<xsl:otherwise><xsl:attribute name="data-list-item"></xsl:attribute></xsl:otherwise>
</xsl:choose>
<xsl:if test="@userLink = 'true'">
<xsl:attribute name="data-app-type">custom</xsl:attribute>
</xsl:if>
<xsl:if test="@disabled = 'true'">
<xsl:attribute name="data-app-disabled">true</xsl:attribute>
</xsl:if>
<a data-list-link="" class="ametys-tools-list__link" data-serverid="{@id}">
<xsl:apply-templates select="." mode="app-href-attr"/>
<xsl:apply-templates select="." mode="app-title-attr"/>
<xsl:apply-templates select="." mode="app-target-attr"/>
<!-- [...] -->
</a>
</li> JIRA ticket: https: ametys