Add the Widget to a Page

Use the Copy Script code to your page section of the widget configuration page to copy and paste the syndication widget code into your web page.

  1. Open the source code for the web page that you want to add the widget to.

  2. Click the Select Text button to select the code that defines your site URL, then press Ctrl+c to copy the code.

    Here’s an example of the code that includes your site URL:

    <script type="text/javascript" scr="https://<your_site>/euf/rightnow/RightNow.Client.js"></script>
  3. Paste the code into the source code of your web page just before the closing </body> tag.

  4. Click the Select Text button to select the code that defines the widget and its attributes, then press Ctrl+c to copy the code.

    Here’s an example of the JavaScript code that includes the widget configuration:

    <script type="text/javascript">
    	RightNow.Client.Controller.addComponent(
    		{
    			div_id: "myDiv",
    			enable_recent: true,
    			presist_contenttype: false,
    			persist_prodcat: false,
    			q: "oracle",
    			instance_id: "okcs_0",
    			module: "OkcsKnowledgeSyndication",
    			type: 10
    		}
    		"https://<your_site>/ci/ws/get"
    	);
    </script>
  5. Paste the copied code just below the code you copied in the previous step.

  6. Click the Select Text button to select the <div> tag code, then press Ctrl+c to copy the code. This code calls the JavaScript code of the widget generated in the previous step.

    Here’s an example of the <div> tag code:

    <div id="myDiv"></div>
  7. Place the <div> tag within the </body> tag where you want the widget to appear on the web page.