Skip to main content
Contiem Connect

Creating a New Widget

  1. On the Project tab, select Project Settings.
  2. On the Project Settings menu, under Content, select Widgets.
  3. Select Create a new Widget Type.
  4. On the New Widget Type dialog:

    • Enter a name for New Widget Type Name.
    • Select the Widget Kind based on your requirements.
    • Select OK.
  5. On the Widget creation page:

    • Enter a Caption and Description, and then assign a Hot Key for the newly created widget.
    • Select Use different Html for design time and output checkbox.
    • In the Design Time Content, select XHTML tab and enter the code related to the new widget you want to create.
      Sample XHTML Code
      Copy Code
      <div class="i-box i-box-note">
      Value1:defaultvalue=Type your GUID here.
      </div>
      <div class="i-box i-box-note">
      Value2:defaultvalue=Type your release number here.
      </div>
    • In the Content, select XHTML tab and enter the code related to the new widget you want to create.
      Sample XHTML Code
      Copy Code
      <div id="releasenotes">
      <p>Loading release notes...</p>
      </div>
      <script src="/greeting.js" type="text/javascript">
      </script>
      <script type="text/javascript">
      //<![CDATA[
      $(function () {
      var val1 = "Value1";
      var val2="Value2";
      displayGreeting(val1, val2);
      }
      );
      
      //]]>
      </script>
  6. In the Project Explorer, right-click Other Files, select Add existing Other File, and select the related JavaScript file for your new widget.

    Sample JavaScript code
    Copy Code
    function displayGreeting(name, greeting)
    {
    alert("Hello " + name + ", " + greeting);
    }
  7. Select Save All.

Top of page