I created a different template (back end) for staff commenting on a specific channel as opposed to the user template pages (which uses the same channel).
But now I see some issues with this approach. When staff comments on the channel entry created by some user, the email sent to the user contains the actual link to the staff back end URL instead of the frontend page template that users have to use.
I could obviously just check if a staff is logged in to the same user page and change the content based on that, but ideally I would prefer to keep all the forms and staff functions separated, which seems cleaner and is reduces potential issues or bugs since I’m not mixing the staff forms and functions with the user ones.
Is there a way to tell EE or pass another URL (fake it) when commenting on that admin backend? That way, users receive the proper URL by email?
Even better, would be to use a completely different email notification if possible.
After digging a bit, it seems the emails are using:
{comment_url}
Which in my case has the undesired effect. In fact, since I redirect to another segment on a success comment, it actually takes that success URL as the comment_url on the notification emails, which is wrong.
I can confirm on my template that has the entry and comment forms displayed that: {comment_url} seems to actually read the whole URI you are currently viewing the comment including additional segments, but for my surprise:{comment_url_title_auto_path}
Does display the valid URL for that channel entry only.
I guess I should just replace {comment_url} for {comment_url_title_auto_path} in the email templates? Or this maybe another way to set this on the channel without messing the global EE notifications for all comment emails.
The information you share is very good and interesting, and thanks to that, I know more useful things. Keep posting interesting things fall guys and I will keep an eye on your posts.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.