1. Summary: Need a solution for emitting the actual TopicAlias text into the generated WebWorks Help output HTML as an additional named anchor.
Here's the question: ''How can we get the Topicalias marker text (AName markers) to display in the URL definition instead of the number (Webworks 5.0 help) and be included as part of the generated help page source text?'' Example: .../Traders_EditDefaultTrader.html#BillingGroup instead of .../Traders_EditDefaultTrader.html#1074138 In the 2007 Webworks project, we added this as a marker definition (<a name="$DATA;"></a>) to get the aname marker text to be included in the generated html file. For example, <a name="BillingGroup"></a> There are two areas where I see that Topicalias marker text is mapped to the marker ID#. 1. \wwhdata\xml\files.xml 2. \wwhdata\common\topics.js. Maybe there is some way to use these files? Any help is appreciated! JOAN.THOMAS@IPC.COM
- If you could use a URL similar to the following, would that be sufficient for your goal?
http://www.webworks.com/wwp2003/index.htm?context=user_guide&topic=BillingGroup
For more information, see: http://www.webworks.com/Technical_Assistance/Tech_Notes/WebWorks_Help/EX_ePub_WWH4-APIePub.shtml
Here's a sample context sensitive link: https://10.204.145.xxx/webadmin/help/index.html?Main|MessageRingerOn
topic=TopicAliasText would be good for the readers, but the developer still wants to have the <a name="TopicAliasText"></a> text listed in the source code of the actual generated HTML page as well. I guess they want to use the same coding as they did before. Does that make sense?
Understood. This can probably be done with a minor XSL override for how TopicAlias markers are processed. The idea would be to simply emit an additional named anchor in the HTML source without modifying any of the javascript implementation or existing named anchors. The text would then be there, but wouldn't be hooked up to anything. I'll see if I can get this submitted for a solution during one of our "Power Hour" webinars. Would this solution be sufficient?
Perfect - thank you for your help! If you need a sample snippet of our old and new help system files, I'll be glad to provide them. I think this is the last piece of the puzzle needed for our help system to get up and running. I am looking forward to participating in the Power Hour! https://webworks.webex.com/mw0305l/mywebex/default.do?siteurl=webworks
After a short discussion with the Engineering team, it looks like XSL overrides are not something that we are currently covering in the Power Hour due to the diverse audience that attend this webinar. So it looks like I jumped the gun by mentioning the Power Hour as a means for getting this solution. In any case, I think this is a worthy request and will see what I can do to get you some assistance from the community.
I understand and do appreciate any community resources you could tap for a solution.
Without it, we're prevented from using the Webworks template set and therefore the search tab capability which is our requirement (until now, we only used Dynamic HTML; that was the selling point for us to upgrade our software). Manually adding conditionalized text is not an option since we have so very many context sensitive links to make. Thank you.
Understood. I agree, conditionalized text is not a good solution.
Short and sweet...
Create an override for content.xsl
Add a new match template for @stylename = 'TopicAlias'
- Emit your named anchor.
<xsl:template match="wwdoc:Marker[@name = 'AName']" mode="wwmode:textrun"> <xsl:param name="ParamSplits" /> <xsl:param name="ParamCargo" /> <xsl:param name="ParamLinks" /> <xsl:param name="ParamSplit" /> <html:a> <xsl:attribute name="name"> <xsl:for-each select="./wwdoc:TextRun/wwdoc:Text"> <xsl:value-of select="@value" /> </xsl:for-each> </xsl:attribute> <xsl:text> </xsl:text> </html:a> </xsl:template>
Thanks for posting a solution!
One code question: In my help project, we use markers called "AName" as our topicalias marker that we want our field sensitive help to open at. In the ePublisher project, I've got the AName marker option set to TopicAlias. Should I be replacing the 'TopicAlias' text in your solution to our actual marker style name? <<Yes>>
Status: I'm getting these errors and no AName marker in the html output files, so I'm not doing something correct:
- Generation started at 11:33:23 AM. Pre-flighting pipeline stages. [Error] Error occurred while reading tranform 'wwformat:Transforms\popups.xsl' from file 'C:\_Work\testCS\3
TopicTest\Formats\WebWorks Help 5.0\Transforms\popups.xsl'. [Error] XSLT compile error. [Error] The 'html:a' start tag on line 1305 does not match the end tag of 'a'. Line 1305, position 50. Initializing file information Generating output Generation finished at 11:33:24 AM. Total time: 00:00:01.
I took a look at the XSL override process described here: http://wiki.webworks.com/HelpCenter/Tips/XslOverrides?highlight=%28stylenam%29 and here: http://wiki.webworks.com/HelpCenter/Tips/2CelledNoteTable?highlight=%28match%29%7C%28templat%29. Those see more complicated than what you are suggesting I do.
I'll continue to make permutations and see if I can get this to work. Thanks!
I corrected my code:
<html:a name="{./wwdoc:Text/@value}"> </a>
should be:
<html:a name="{./wwdoc:Text/@value}"> </html:a>
Thank you for fixing the end tag format and my "context.xsl" instances. That cleared the error, but the marker text is still not displaying in the WebWorks 5.0 help.
So I tried the Dynamic HTML template, it gets the solution part of the way, but not exactly correct. The output needs to be like this <a name="ReceiveVolumeOn"> Here is a field definition in the generated dynamic html help for Receive Volume On
<tr style="vertical-align: baseline;"> <td> <div class="Bullet_inner" style="width: 14.4pt; white-space: nowrap;">• </div> </td> <td width="100%"> <div class="Bullet_inner"><span class="Click"><a name="1071302">Receive Volume On</a></span> – AName = ReceiveVolumeOnSelect the check box to give traders the ability to adjust the receive audio level from their station. Deselect the check box to prevent the trader from doing so. Database source is <code class="Code">t_default_trader.pr_rcv_vol</code>. This field also displays as column <span class="Type">L</span> in <span class="Click">Main Menu > Trader Configuration > Traders > </span><span class="Click">Trader View</span>.</div> </td> </tr>
Either way, it is the Webworks 5.0 template help is what we're looking for...to be continued
Can you attach an example WWHelp 5.0 project with source document to this case? Then we can just fire it up and have a look.
Added Joan's project as testset_Webworks5_help.zip.
I've uploaded a cleaned up version of your Design (Pro) project as ANames.2008.3.zip.
Couple of notes:
- I'd recommend against placing your Express projects and Stationery inside your Design (Pro) project folder. If you want to keep them together, consider an alternate layout, such as:
<Design> <Pro Project> pro.wep <Stationery> stationery.wxsp <Express> express.wrp
- The Design (Pro) project seems to contain overrides for everything, includes unmodified files. Those have been reset back to the minimal overrides required to achieve your desired output.
- The Target overrides matched the Format overrides and were therefore eliminated from the project.
- There were a couple of files places in areas that are not referenced by the Help runtime, so they are eliminated to reduce overall file counts.
Double-check your skins, etc., to ensure I didn't miss anything when reorganizing your image/skin overrides.
SOLVED: Many thanks Ben! I just had to replace a few figures and I was ready to go.
I didn't have to follow the process that creates an "Includes" folder...only paste the code you have at the proper place in the ProProject\Formats\WebWorks Help 5.0\Transforms\content.xsl file.
It is amazing how after generating a help project the size jumps from less than 1MB to 5MB. Next time I zip files, I'll be sure not to include the extra baggage!