How to create link to email topic URL
How to create link to email topic URL
This seems simple but I can't find an answer. Need to add a link to my master page so that users can share topic URLs via email. So, click the link, it opens their default email app, topic URL is populated in the email body, and they can send it to whoever they want. What obvious solution am I missing today?
-
- Senior Propellus Maximus
- Posts: 2630
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: How to create link to email topic URL
I have the following stuff in my master page template. This script checks the SVN revision number and shoves it in too, so you could probably chop this down.
<script type="text/javascript">/*<![CDATA[*/document.write("<a href='mailto:XXXX_REQUIRED_EMAIL_ADDRESS_XXXX?subject=Customer%20Feedback%20("+document.title+")%20Build:%20$WCREV$&body=Topic%20Reference%20(XXXXCOMPANY NAMEXXXX%20use%20only):%20"+location.href+"%0A%0APlease%20enter%20your%20comments%20below:%0A%0A'>Send feedback on this topic</a>");
/*]]>*/</script>
Hope that's a useful starting point.
<script type="text/javascript">/*<![CDATA[*/document.write("<a href='mailto:XXXX_REQUIRED_EMAIL_ADDRESS_XXXX?subject=Customer%20Feedback%20("+document.title+")%20Build:%20$WCREV$&body=Topic%20Reference%20(XXXXCOMPANY NAMEXXXX%20use%20only):%20"+location.href+"%0A%0APlease%20enter%20your%20comments%20below:%0A%0A'>Send feedback on this topic</a>");
/*]]>*/</script>
Hope that's a useful starting point.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: How to create link to email topic URL
Thank you for the code snippet. I will try it out in a bit. My first attempt throws a Flare error but I can't do any troubleshooting until later today or tomorrow. I'm a little surprised that emailing is not an included topic toolbar function!
Re: How to create link to email topic URL
So do you want a link or a topic toolbar button?TR Lisa wrote:I'm a little surprised that emailing is not an included topic toolbar function!
CM's example is a hyperlink, that you could put in your master page (or topic).
If you want an email toolbar button, just add your own button to the toolbar in the skin editor, then for the button Click action use something like:
Code: Select all
document.location.href="mailto:?subject=Read this: " + document.title +"&body=Link: " + location.href;
Re: How to create link to email topic URL
Thank you Dave. A button would be nicer I think. In the past we just used an image on the master page because we didn't have a topic toolbar. But now that I'm doing a complete content and design refresh I'd like to add a topic toolbar for printing, expanding, emailing the link, etc. I'll give your suggestion a try. I was having trouble getting the topic URL to populate in the email. It was working at one time (in the code project I inherited) but I discovered recently something broke and I'm trying to fix it in the old and do it right in the new.
Re: How to create link to email topic URL
I use the "Feedback" button feature in the topic toolbar that includes the topic URL in the body of the email. I have a business partner that would like additional text to display to help "guide" the feedback. I know I can create a link and add to the master page, but they are adamant about including the topic URL. Suggestions?
Re: How to create link to email topic URL
The examples above already include the URL of the topic - that's inserted by the location.hrefeknell wrote:I use the "Feedback" button feature in the topic toolbar that includes the topic URL in the body of the email. I have a business partner that would like additional text to display to help "guide" the feedback. I know I can create a link and add to the master page, but they are adamant about including the topic URL. Suggestions?
Re: How to create link to email topic URL
I understand that location.href is the key to including the topic URL, and I am able to successfully use the location.href when I edit the topic toolbar Feedback button. What is the key to getting the location.href to generate the topic URL in an email hyperlinked from that topic?
-
- Senior Propellus Maximus
- Posts: 2630
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: How to create link to email topic URL
When the email is generated, both location.href and document.title are substituted with the actual location and title, so you don't have to DO anything.eknell wrote:I understand that location.href is the key to including the topic URL, and I am able to successfully use the location.href when I edit the topic toolbar Feedback button. What is the key to getting the location.href to generate the topic URL in an email hyperlinked from that topic?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx