Loading SCSS files New variable XSL SitemapInputData Redesigned registration service Redesigning comments Date i18n SASS skinUrl function Password service Content upload service Page Upgrade Service iFrame service Former research department Plugins Loading SCSS files SCSS file uploads are now mandatory withurl in .css.
Replace links such as :
Oops! Copy to clipboard failed. Open the code and copy it manually.<link rel="stylesheet" href="{ametys:skinURL('css/styles.scss')}"/> <link rel="stylesheet" href="{ametys:skinURL('css/styles.scss')}"/>
<link rel="stylesheet" href="{ametys:skinURL('css/styles.scss')}"/> by
Oops! Copy to clipboard failed. Open the code and copy it manually.<link rel="stylesheet" href="{ametys:skinURL('css/styles.css')}"/> <link rel="stylesheet" href="{ametys:skinURL('css/styles.css')}"/>
<link rel="stylesheet" href="{ametys:skinURL('css/styles.css')}"/> New variable XSL A new variable XSL $zone is available. It bears the name of the zone you are in. It is therefore only used in XSL to render a service or content.
Outside a zone, this variable is set to "default".
SitemapInputData You can configure SitemapInputData (for menu construction, breadcrumb trail, etc.) by adding the configuration file skins/[SKIN]/conf/sitemap.xml to your graphic charter.
This file allows you to override the following 2 options:
initial-depth: maximum depth from site map root. 2 by default descendant-depth: max depth below current page. 1 by default. Example file :
Oops! Copy to clipboard failed. Open the code and copy it manually.<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<initial-depth>3</initial-depth>
<descendant-depth>3</descendant-depth>
</sitemap> <?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<initial-depth>3</initial-depth>
<descendant-depth>3</descendant-depth>
</sitemap>
<?xml version="1.0" encoding="UTF-8"?>
<sitemap>
<initial-depth>3</initial-depth>
<descendant-depth>3</descendant-depth>
</sitemap> It is therefore no longer necessary to redefine SitemapInputData when these parameters need to be modified.
Redesigned registration service The following changes have been made to the "Registration" service:
The user's first and last name are requested only after the validation of email Validation of the GCU is also requested only after validation of email You can insert the content of the T&Cs at the end of the form. Errors are processed and displayed field by field (instead of at the top of the form). Redirect page on success is now a service parameter It is possible to display final content at the end of the registration instead of a link to a validation page. If you have overloaded the rendering of this service in your graphic charter, refer to XSL signup_3.5.xsl kernel to reapply your modifications.
Redesigning comments Content commenting functionality has been enhanced. It is now possible to :
Reply to a comment Report a comment (XSL reporters/comments_reporters.xsl) Liked a comment (XSL like/comments_like.xsl) Delete a comment (XSL delete/comments_delete.xsl) If you have overloaded XSL comments_3.3.xsl in your charter, many changes have been made. Refer to XSL comments_3.3.xsl core to re-apply your changes.
In particular :
The "uniqueId" variable:
This variable has been renamed "commentUniqueId". The uniqueId variable is now provided by stylesheets/helper/common_3.3.xsl.
The "comments" template:
How it differs from the new comments_3.3.xsl The main difference is that it now calls the "comment-form-script" template.
The "how to" template:
Making the difference with the new comments_3.3.xsl
The "comment-header" template:
Making the difference with the new comments_3.3.xsl
The "comment-footer" template:
Faire la différence avec le nouveau comments_3.3.xsl La principale différence est le <p> englobant qui devient un <div>
The "comment-form" template:
It has been renamed "comment-add" To differentiate it from the new comments_3.3.xsl
Add "comment-id" parameter:
All subsequent templates have this new parameter, as the form now depends on the comment identifier:
comment-form-field-name comment-form-field-mail comment-form-field-hidemail comment-form-field-url comment-form-field-content comment-form-field-captcha comment-form-field-additional comment-form-field-submit The identifiers of the various tags have therefore changed: make the difference with the new comments_3.3.xsl
The "comment-form-script" template:
The script website has changed to handle changes of identifier: see the difference with the new comments_3.3.xsl
Date i18n The wrong pattern for parsing dates is sometimes used.
Recherchez dans vos XSL les <i18n:date> utilisant le pattern hh:mm et remplacez par HH:mm .
For example
Oops! Copy to clipboard failed. Open the code and copy it manually.<i18n:date src-pattern="yyyy-MM-dd'T'hh:mm:ss" pattern="long" value="{startDate}"/> <i18n:date src-pattern="yyyy-MM-dd'T'hh:mm:ss" pattern="long" value="{startDate}"/>
<i18n:date src-pattern="yyyy-MM-dd'T'hh:mm:ss" pattern="long" value="{startDate}"/> should be replaced by
Oops! Copy to clipboard failed. Open the code and copy it manually.<i18n:date src-pattern="yyyy-MM-dd'T'HH:mm:ss" pattern="long" value="{startDate}"/> <i18n:date src-pattern="yyyy-MM-dd'T'HH:mm:ss" pattern="long" value="{startDate}"/>
<i18n:date src-pattern="yyyy-MM-dd'T'HH:mm:ss" pattern="long" value="{startDate}"/> SASS skinUrl function In your .scss files, you can use the SASS skinUrl function. Its use is similar to that of ametys:skinUrl in XSL.
For example:
Oops! Copy to clipboard failed. Open the code and copy it manually..container {
background: skinUrl('/img/bg.png');
} .container {
background: skinUrl('/img/bg.png');
}
.container {
background: skinUrl('/img/bg.png');
} Password service If you override the global-error-messages template of the "Password" service (password*.xsl), the way to retrieve the error message has been simplified:
This block :
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:choose>
<xsl:when test="$error-type = 'user-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_USER_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'population-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_POPULATION_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'unmodifiable-user-directory'">
<i18n:text 18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_UNMODIFIABLE_USER_DIRECTORY" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'empty-email'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_EMPTY_EMAIL" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'several-users'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_SEVERAL_USERS" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'error-token-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_TOKEN_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
</xsl:choose> <xsl:choose>
<xsl:when test="$error-type = 'user-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_USER_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'population-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_POPULATION_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'unmodifiable-user-directory'">
<i18n:text 18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_UNMODIFIABLE_USER_DIRECTORY" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'empty-email'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_EMPTY_EMAIL" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'several-users'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_SEVERAL_USERS" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'error-token-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_TOKEN_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
</xsl:choose> Voir le code
<xsl:choose>
<xsl:when test="$error-type = 'user-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_USER_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'population-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_POPULATION_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'unmodifiable-user-directory'">
<i18n:text 18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_UNMODIFIABLE_USER_DIRECTORY" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'empty-email'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_EMPTY_EMAIL" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'several-users'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_SEVERAL_USERS" i18n:catalogue="plugin.web"/>
</xsl:when>
<xsl:when test="$error-type = 'error-token-unknown'">
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_TOKEN_UNKNOWN" i18n:catalogue="plugin.web"/>
</xsl:when>
</xsl:choose> Becomes :
Oops! Copy to clipboard failed. Open the code and copy it manually.<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_{$error-type}" i18n:catalogue="plugin.web"/> <i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_{$error-type}" i18n:catalogue="plugin.web"/>
<i18n:text i18n:key="PLUGINS_WEB_SERVICE_USER_CHANGE_PASSWORD_ERROR_{$error-type}" i18n:catalogue="plugin.web"/> Content upload service If you override the rendering of the Content retrieval service (filtered-contents/list*.xsl), the type of the 'pagination' parameter has changed. Replace :
Oops! Copy to clipboard failed. Open the code and copy it manually.$pagination = '' $pagination = ''
by
Oops! Copy to clipboard failed. Open the code and copy it manually.not($pagination) not($pagination)
Page Upgrade Service If you override the rendering of the Page Up service (filtered-pages/list*.xsl), the type of the 'pagination' parameter has changed. Replace :
Oops! Copy to clipboard failed. Open the code and copy it manually.$pagination = '' $pagination = ''
by
Oops! Copy to clipboard failed. Open the code and copy it manually.not($pagination) not($pagination)
iFrame service If you override the rendering of the iFrame service (iframe*.xsl), the type of the 'height' parameter has changed. Replace :
Oops! Copy to clipboard failed. Open the code and copy it manually.$height = '' $height = ''
by
Oops! Copy to clipboard failed. Open the code and copy it manually.not($height) not($height)
and
Oops! Copy to clipboard failed. Open the code and copy it manually.$height != '' $height != ''
by
Oops! Copy to clipboard failed. Open the code and copy it manually.Former research department The location of XSL for the old "Search engine" service, renamed "Page search", has changed.
The folder "skins/[SKIN]/services/web/pages/search" should be renamed to "skins/[SKIN]/services/web/pages/search-pages".
And all associated imports must be modified! (including from other search services that share these XSLs): remember to search your entire project.
For example:
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:import href="plugin:web://pages/services/search/search_3.3.xsl"/> <xsl:import href="plugin:web://pages/services/search/search_3.3.xsl"/>
<xsl:import href="plugin:web://pages/services/search/search_3.3.xsl"/> should be replaced by :
Oops! Copy to clipboard failed. Open the code and copy it manually.<xsl:import href="plugin:web://pages/services/search-pages/search_3.3.xsl"/> <xsl:import href="plugin:web://pages/services/search-pages/search_3.3.xsl"/>
<xsl:import href="plugin:web://pages/services/search-pages/search_3.3.xsl"/> Plugins Depending on the plugins Ametys you use, you must follow the graphic migrations specific to each plugin :