How to Add Tweet Button in WebHelp Classic Output
To add a Twitter™ Tweet widget to your WebHelp output, follow these steps:
- Go to the Tweet button generator page.
- Fill-in the displayed form.The Preview and code area displays the code.
- Copy the code snippet displayed in the Preview and code area and
paste it into a
divelement inside an XML file calledtweet-button.xml.Make sure you follow these rules:- The file must be well-formed.
- The code for each
scriptelement must be included in an XML comment. - The start and end tags for the XML comment must be on a separate line.
<div id="twitter"> <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a> <script> <!-- !function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http': 'https'; if (! d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + '://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js, fjs); } } (document, 'script', 'twitter-wjs'); --> </script> </div> - In Oxygen XML Author plugin, click the
Configure Transformation
Scenario(s) action from the toolbar. - Select an existing WebHelp transformation scenario (depending on your needs, it may be with or without feedback, or the mobile variant) and click the Duplicate button to open the Edit Scenario dialog box.
- Switch to the Parameters tab and edit the
webhelp.footer.fileparameter to reference thetweet-button.xmlfile that you created earlier. - Click Ok.
- Run the transformation scenario.