Hi dears all,
Just a new point to dynamically modify the terms.ftl form (login theme) content by adding text.
Regarding the login form, I know that we can act on it by means of the FreeMarkerLoginFormsProvider.
Is there a kind of provider like this to try to customize the terms.ftl from the backend? The challenge is that I want to change it every time it needs according to some internal parameters I have to manage. Does anybody have already done something similar?
This is not possible ootb. The
terms.ftl is very static…
I’d suggest to do this with a custom required action and a customized
myTerms.ftl (or similar). In the custom required action code, you can get your desired content from wherever you want to obtain it and put it into the forms/challenge context and display it with your custom
Perhaps extending the default terms required action and customizing it from this point might be a good starter.
Yes Niko, I do confirm terms.ftl it is static therefore I implemented a custom Required Action, just to try.
Now the new issue is about the Accept that is not working while Decline is:
what I noticed is that the evaluateTriggers (a kind of filter inside to establish if the action is to be launched) is called a couple of times (strange to me) while processAction method never. It sounds like something is missing!
Better said: if I comment all of the evaluateTriggers content the action works, otherwise the custom terms and conditions form can’t close.
I overcame the issue about the “evaluateTriggers” method, needed because I want to display the Terms and Conditions page only when it needs. Troubles with parameters!
For the rest, it is a standard Custom Required Action none other (that means as explained into the documentation), and the new terms.ftl can be easily customizable, that way.