Getting document title into mail subject in the footer

Topics: User Forum
Jan 17, 2007 at 7:51 AM
Hi and thank you for a wonderful tool!

To start off with, I´m not 100% sure if this question belongs in this forum or if it should be posted in the general sandcastle forum on, but I thought I'd start by trying here.

I am trying to create a "mailto" link in the footer of each generated page in the sdk. No problem there, but I also want to parse the mailto link to include a "?subject=". At the end of that string I'd like to append the document title of the current page.

I have tried embedding javascript through the use of xsl from examples I found googling, but I haven't been able to make this work.

I have mainly been playing around with the shared_content.xml file as this seemed to be the place to do it.

Any ideas?

Thank you in advance / Daniel
Jan 17, 2007 at 7:15 PM
This may be possible. I'll take a look and let you know what I find. It may be a few days before I respond.

Jan 18, 2007 at 7:46 AM
Thanks for replying, looking forward too see if you find a solution.

/ Daniel
Jan 24, 2007 at 6:38 PM
I've modified the shared_content.xml files in each of the sub-folders under the LanguageResources folder to append the topic title to the e-mail address. You can modify it as follows for the time being if you need it now:

<item id="comments"><p/>Send comments on this topic to
<a id="HTMailLink" href="mailto:{@UrlEncFeedbackEMailAddress}?Subject={@UrlEncHelpTitle}">{@HtmlEncFeedbackEMailAddress}</a>
<script type="text/javascript">
var HTmailLink = document.getElementById("HTMailLink");
var HTmailLinkText = HTmailLink.innerHTML;
HTmailLink.href += ": " + document.title;
HTmailLink.innerHTML = HTmailLinkText;

It needs to preserve the inner HTML and reset it after setting the HREF as I found that when modifying the HREF, if the inner HTML contains '@', it sets the inner HTML to the HREF value as well.


Jan 25, 2007 at 7:25 AM
Thank for looking into it, I'll try it out today =)
Jan 25, 2007 at 7:46 AM
Hi (and sorry for bumping the thread with two posts after eachother) I tried it out and it worked like a charm, greatly appriciate it!

/ Daniel