When integrating CMS Ametys , it is sometimes necessary to set up authentication on the site, for example in the case of pages with restricted access (for more information, please consult the page Restricting access to a page in the user manual).
The parameters for this authentication are described on the visitor authentication page of the integration manual. However, you may need to create your own connection form (to match your site's graphic charter, for example). In this case, you need to redefine the graphic template and/or the login form
Overload the template used to render the login form
By default, the template used to "wrap" (or contain) the form is login(skins/[NOM_SKIN]/templates/login/styllesheets/template.xsl); if it doesn't exist, the page template will be used(skins/[NOM_SKIN]/templates/page/styllesheets/template.xsl).
By default, this template must contain a zone whose identifier is default; it is in this zone that the form will be displayed.
Oops!
Copy to clipboard failed. Open the code and copy it manually.
For further explanations of these concepts, please consult the Graphic integration page.
Overload the login form
The form can be overloaded in your graphic charter if the default HTML code is not appropriate. To do this, create a XSL style sheet at skins/[NOM_SKIN]/services/web/pages/frontoffice-login/login.xsl.
We advise you to use this file as a basis for your work and to implement your modifications. For output, xsl must comply with the embedding formalism (see xsl embedding).
The input to xsl is xml :
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Further information If you wish to redefine the form fields, you must create a new plugin for the by following the instructions on the Creation of a plugin and add the following extension by modifying the tags username-field, password-field and rememberMe-field according to your own fields.
Oops!
Copy to clipboard failed. Open the code and copy it manually.
Please note that url loginUrl and loginFailedUrl do not need to be specified, unlike the FormBased extension defined in CMS (see page Creating a login form).
Then use the Plugins and Workspacesof the to select your new extension, or edit the file directly. WEB-INF/param/runtime.xml
Oops!
Copy to clipboard failed. Open the code and copy it manually.