FEU 3.1.3 - various questions
Posted: Fri Sep 06, 2019 1:27 pm
Running CMSMS 2.2.11. Having some problems with the new FEU. These questions will be a mix of technical "how to" questions and design questions.
1. This is my current login page:
I struggled with getting post-login redirect to work. returnto is not documented in the FEU help. Is it correct? It seems to be used in the code. I had passed an argument in the prior edition of my code, and it worked fine.
In the .tpl file, some variables are mentioned. How and where do I set, for example, the $requested_url variable? That seems like it would be the solution to my post-login redirect problem.
2. In the FEU documentation, it mentions {redirect to=$url} a couple of times. I look in the Tags section of CMSMS, and I see redirect_url and redirect_page, but no plain redirect. What am I missing? Is a plugin the same as a tag?
3. How and where do I adjust the $msg_post_logout that is used in the orig_logout.tpl?
4. The logout page was another bugger for me. One thing I did was in the Logic for the page, I put this:
It didn't seem to use my template. OK, so I changed the page type to the new FEU Logout link. A couple of problems came out with that. I have no option to give a module hint because the Logic page is gone with this page type. Also, the "Logout" option disappeared from the site menu. (When Members were logged in, they would get more options in the menu, one of those options being "Logout").
As to design, it seems strange to require a special case page type for a logout link.
Given this, on my login page, is it cool to call {cms_module_hint} several times, to tell FEU about all its templates, even ones not relevant to the login operation?
5. Relative to the last line above, I am quite sure it is wrong. It is not documented in the help, and I don't see a SetParamterType for it in FrontEndUsers.module.php.
The docs say:
How do I tell FEU about assets/module_custom/FrontEndUsers/templates/my_post_logout.tpl ?
6. The {cms_module_hint} doesn't seem well named in this case. Formerly, I had parameters that were sent to the FEU module when I called it for login or logout. It seems like a good place to have them, at the call site. OK, I can live with moving them out of the call line. But "hint" is not the right semantics. It is not a hint. It is a command. It is a requirement. It is an argument that is passed into the routine as a parameter. It is necessary information to the proper functioning of that thing.
Thanks for reading, and any help that you can provide.
1. This is my current login page:
Code: Select all
{if feu_smarty::get_current_userid()}{redirect_page page='parent-home'}{/if}
<h1>Please log in to access more information.</h1>
{FrontEndUsers action="login" returnto='parent-home'}
In the .tpl file, some variables are mentioned. How and where do I set, for example, the $requested_url variable? That seems like it would be the solution to my post-login redirect problem.
2. In the FEU documentation, it mentions {redirect to=$url} a couple of times. I look in the Tags section of CMSMS, and I see redirect_url and redirect_page, but no plain redirect. What am I missing? Is a plugin the same as a tag?
3. How and where do I adjust the $msg_post_logout that is used in the orig_logout.tpl?
4. The logout page was another bugger for me. One thing I did was in the Logic for the page, I put this:
Code: Select all
{cms_module_hint module=FrontEndUsers logouttemplate="my_logoutform.tpl"}
As to design, it seems strange to require a special case page type for a logout link.
Given this, on my login page, is it cool to call {cms_module_hint} several times, to tell FEU about all its templates, even ones not relevant to the login operation?
Code: Select all
{cms_module_hint module=FrontEndUsers logintemplate="my_loginform.tpl"}
{cms_module_hint module=FrontEndUsers logouttemplate="my_logoutform.tpl"}
{cms_module_hint module=FrontEndUsers postlogouttemplate="my_post_logout.tpl"}
The docs say:
Code: Select all
The FEU module no longer redirects after a logout by default, as it does not know where to redirect to.
To solve this you should customize the appropriate "post_logout" template, and put your redirection in there. i.e.:
{cms_selflink href='welcome' assign='url'}{redirect to=$url}
6. The {cms_module_hint} doesn't seem well named in this case. Formerly, I had parameters that were sent to the FEU module when I called it for login or logout. It seems like a good place to have them, at the call site. OK, I can live with moving them out of the call line. But "hint" is not the right semantics. It is not a hint. It is a command. It is a requirement. It is an argument that is passed into the routine as a parameter. It is necessary information to the proper functioning of that thing.
Thanks for reading, and any help that you can provide.