@jlee -
The author stated that he believed that adding {return} to the head section of the template would redirect users to the template referred to in your return tag. This would not work for me.
I solved the problem by adding
{if logged_in} {meta_refresh} {/if}
in the head section of my messages template. This will cause the page to redirect after a short pause on the messages page stating that they have logged in. The down side, if I am right, is that it will always do this, for every message. There is little documentation for both ee2 and this module, so I am guessing. If you or anyone can find a better solution, please post it.
This extension isn’t meant to get rid of that page after you login. EE still wants to redirect you to another page when you login, encounter an error, or some other message is delivered. This is just meant to give you more control over the contents of that page, and keep the page on the file system rather than in the database (ideal for version control), and be able to use any other template tag in it. The same variables available in the default specialty template are available in this extension too.
It is probably possible for me to add some additional options so select where you are re-directed to after a certain action happens, but this would need to be done based on the ACT values in the database, or maybe I set it up to accept a GET/POST value, which you could define as the redirect path and completely bypass the page this extension will render.
Does that clear things up? Did I understand and answer your questions?
Here are a couple of examples in how I have used it, and this is what most of my templates end up looking like.
{embed="global/_header" body_class="error_page" meta_refresh="{meta_refresh}"}
<div class="box_white_full">
<div class="outer_container">
<div class="container">
<div class="inner_container">
<!-- BEGIN CONTENT -->
<h3>{heading}</h3>
{content}
{link}
<!-- END CONTENT -->
</div>
</div>
</div>
</div>
{embed="global/_footer"}{embed="global/_header" body_class="error_page" refresh="{meta_refresh}"}
<div id="content" class="interior clearfix">
<div class="main_col">
<div class="user_content">
<h1>{heading}</h1>
{content}
{link}
</div>
<div class="interior_rule"></div>
</div>
<div class="sub_col">
{embed="global/_sidebar" url_title="home"}
</div>
</div>
{embed="global/_footer"}Yes, thank you. I don’t know about jlee, but my original question was in regards to the default behavior of ee’s message templates changing once I installed this module. When using a login tag, by default, ee was automatically redirecting to the page specified in a return var.
You would use:
{exp:member:login_form return="home/"}
to make a login form to handle user login and redirection to “home/”.
After installing this module, this behavior stopped working. Users were no longer redirecting to the template defined in “return” in the login tag, but stalled on the message page. By adding a {meta_refresh} to the message template (and it appears you did also in your example: ..refresh=”{meta_refresh}”}) the functionality returns. This is an extra step I had to take in order to get it to function as it did pre-module.
Again, I am completely new to ee, so I may be missing something. If so, I am sorry.
Thanks for your work.
I see what you are saying. I’ll look into this a little more and try to re-create your problem, but the only thing that is really happening is that instead of parsing the text in the specialty template field, it loads a file from the file system, so up to this point, whatever action EE is taking has not been modified. So I can’t explain whey the return=”home” isn’t acting the same way, but I’ll look into it.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.