To support integrating topics into websites as callouts, the CSProcessor should generate a javascript file called "pressgang_website.js" in the Publican files directory. The format of this file is shown below. It follows the JSONP format, calling the pressgang_website_callback function with a dictionary that maps CSS element selectors with information about the topics that relate to them. The "css_selector" strings are the values assigned to the "PressGang Websites Element ID" extended property (id 37), and will probably look like "#SearchButton". The "fixed url" strings are the values assigned to the "Fixed URL" extended property (id 20). pressgang_website_callback({ "css_selector1": {"target":"fixed url", "topicid":"12345"}, "css_selector2": {"target":"fixed url", "topicid":"12346"}, "css_selector3": {"target":"fixed url", "topicid":"12347"}, etc... }); The callback will then use this information to associate help topics with specific UI elements.
On second thought this should just be an array of topic ids, fixed urls and titles. pressgang_website_callback([ {"topicId":12345,"target":"Fixed URL","title":"Topic Title 1"}, {"topicId":12346,"target":"Fixed URL","title":"Topic Title 1"}, etc... ]);
I have incorporated the javascript file into the dev instance of the UI, and it is working great. I'd like to get the objects in the array to include the value of property tag 37. That has been repurposed to indicate which version of the UI the topic contains new information for. With this information we can indicate new features as they become available. If property tag 37 is assigned to a topic more than once, just include the largest/latest value (sorted alphabetically). E.g. pressgang_website_callback([ {"topicId":12345,"target":"Fixed URL","title":"Topic Title 1","newSince":""}, {"topicId":12346,"target":"Fixed URL","title":"Topic Title 1","newSince":"201308031011"}, etc... ]);