Request Processing Return Links
Though it is possible to fully customize the templates used by MT-Notifier for either display online or via email, one function where you don't have to do any of that dirty work is if you would like to give your users the option to return to the page that they were just viewing after subscribing.
All you need to do is add two fields to the subscription form, and if they are found in the form when the subscription is processed, the template will automatically provide the return links for you. Though this has been in the template for some time, it has never been documented, and this will tell you just how to do it.
First, make sure you're using the Standalone Subscription Form as described in the Subscriptions section of the setup documentation. This method won't work with the checkbox method for subscribing to comments (because using that method doesn't give you a screen showing that you've subscribed).
Next, you just need to add two fields inside your subscription form. They should look something like this:
<input type="hidden" name="n" value="Return to Blog" /> <input type="hidden" name="r" value="<$MTBlogURL$>" />
The important parts to note here are the names - the first line is the name that will show up on the request processing screen. That field needs to have a name of "n" (n for name - make sense?). The second line is the redirect, and it needs to have a name of "r" (for redirect - catchy, isn't it?).
Here, I've given an example for a blog, and used <$MTBlogURL$>. If you were doing this on a category page, you might want to say "Return to Category" and use <$MTCategoryArchiveLink$> instead. On an entry, you would of course use <$MTEntryPermalink$>, but since this wouldn't work on a checkbox form, you'd have to have a standalone form on your individual entry archive for it to work correctly.
More Information on "MT-Notifier" »
Comments
Hi Chad,
How about the landing pages, when someone clicks on a link (in email confirmations) or subscribes with the subscription form? Is that possible to edit their look directly through MT's templates? For example to create a new template named .... and change it's look? What I am trying to do is to put my blogs header and sidebars on these pages.
Posted by: Nicholas | March 8, 2008 7:32 PM
And the email templates too.
Posted by: Nicholas | March 8, 2008 7:37 PM
Hi Nicholas -
You can edit the templates by looking in the "tmpl" directory of the MT-Notifier plugin, but with version 4, MT-Notifier started using the built-in header.tmpl (that is, the one that ships with MT), so you'd actually have to copy that over and modify it instead.
To make matters worse, the new version of the plugin I'm working on to work well with MT 4.1 will use an integrated MT function, and even that won't be possible - it'll use MT completely, and that will make it pretty well impossible to do that.
As to email, though, just look in the "email" directory and go nuts. As to doing it in MT, however, that is something that I've considered, but there isn't a huge call for it. I'll keep it in mind though.
Posted by: Chad Everett | March 12, 2008 10:21 AM
I agree with Nicholas that the ability to easily customise the landing pages would be really welcome.
I'm using MT-Notifier on a commercial site and it's not ideal to have the site break out of the client design and into MT styling whenever a user subscribes.
Not to say that the plugin isn't great, it is - but being able to fully customise the user experience is important. Maybe it's something you could include in the commercial license? Or as a costed extra? I know my client would probably shell out a bit more to be able to keep their design intact throughout the site.
Posted by: Richard | August 15, 2008 10:33 AM
Hi Chad.
No matter how I try i cannot get the redirect to work. I get the MT Notifications Movabletype page and nothing else.
I guess I am doing something wrong or the added two lines do not work with MT4.2 Pro (this did not work earlier either but I did not have time to work on it..
Thanks in advance.
Carina
Posted by: Carina | August 17, 2008 11:24 AM
Hi Richard -
Unfortunately, I was a bit delayed on a new version with the release of MT 4.2, so I don't have a new release at the moment, but something like this may be possible by customizing templates.
It's probably not a service that I'd offer, mostly because my design skills aren't very good. More than likely it would be a feature that you'd be able to access through the feature though. I just have to find the time to get it working correctly (and reliably). I'll keep you in mind as well!
Posted by: Chad Everett | August 20, 2008 9:59 AM
Hi Carina -
Also sent you an email on this, but please make sure you're using the standalone subscription form, as described on the subscriptions page - this definitely won't work if you're using a comment form!
Posted by: Chad Everett | August 26, 2008 10:55 AM
Hi Chad,
I'm in the same boat as Carina above. I've got a standalone subscription form and I'd like to be returned to the original page after successfully subscribing, but I can't seem to make it happen. I've copied the two lines above into my subscription form, and I can see that the form variables are definitely there in the URL, but nothing seems to happen--I remain sitting at the confirmation page.
Any advice? We're on your most recent MT-Notifier and MT v4.2.
Thanks in advance.
Posted by: Brian | September 23, 2008 2:52 PM
Hi Brian -
As mentioned above, make sure you are using the standalone form (not a comment form). Beyond that, make sure that you have the most recent version of the code installed. As of this writing, it is 4.0.5, which you can download from the links you received when registering. Just re-download, and it will pull the latest code.
One note, however - you won't automatically be redirected - you'll just be given a link to return to that page (you could update the template with a meta refresh or something, however).
I hope this helps!
Posted by: Chad Everett | September 23, 2008 4:42 PM