How to create link to email topic URL

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

How to create link to email topic URL

Postby TR Lisa on Tue Apr 10, 2018 8:58 am

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? :)
TR Lisa
Sr. Propeller Head
 
Posts: 100
Joined: Thu Jul 06, 2017 8:09 am

Re: How to create link to email topic URL

Postby ChoccieMuffin on Thu Apr 12, 2018 9:07 am

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.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2147
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How to create link to email topic URL

Postby TR Lisa on Thu Apr 12, 2018 9:53 am

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!
TR Lisa
Sr. Propeller Head
 
Posts: 100
Joined: Thu Jul 06, 2017 8:09 am

Re: How to create link to email topic URL

Postby Dave Lee on Thu Apr 12, 2018 11:40 pm

TR Lisa wrote:I'm a little surprised that emailing is not an included topic toolbar function!


So do you want a link or a topic toolbar button?

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;
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: How to create link to email topic URL

Postby TR Lisa on Mon Apr 16, 2018 10:42 am

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.
TR Lisa
Sr. Propeller Head
 
Posts: 100
Joined: Thu Jul 06, 2017 8:09 am

Re: How to create link to email topic URL

Postby eknell on Mon Jun 03, 2019 2:22 pm

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?
eknell
Jr. Propeller Head
 
Posts: 5
Joined: Wed Sep 23, 2015 6:58 am

Re: How to create link to email topic URL

Postby Dave Lee on Mon Jun 03, 2019 11:20 pm

eknell 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?


The examples above already include the URL of the topic - that's inserted by the location.href
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: How to create link to email topic URL

Postby eknell on Tue Jun 04, 2019 6:41 am

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?
eknell
Jr. Propeller Head
 
Posts: 5
Joined: Wed Sep 23, 2015 6:58 am

Re: How to create link to email topic URL

Postby ChoccieMuffin on Tue Jun 04, 2019 7:28 am

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?


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.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2147
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 4 guests

cron