Use Author-it variables in the footer

Publish

Platform_KC
On Premises

Use Author-it variables in the footer to publish information such as when the topic was last modified and the user who made the modifications.

To add a variable to the footer:

  1. Add the div tag in the index.htm file:
    1. Open the index.htm file and locate the footer table.

      <!--footer-->

      <tr>
      <td id="footer">
      <table class="footer" >
      <tr>
      <td align="left">
      <div id="modified"></div>
      </td>
      <td align="center">
      </td>
      <td align="right">
      <a href="http://www.author-it.com" target="_blank">
      <img src="images/builtbyait.gif" alt="http://www.author-it.com" />
      </a>
      </td>
      </tr>
      </table>
      </td>

      </tr>

    2. Create the new div tag after the "modified" tag. The code should look something like this:

      <td align="left">
      <div id="modified"></div><div id="modifiedby"></div>
      </td>

      This code displays the "modified by" content below the "modified date" in the footer.

    3. Save the changes to the index.htm file.
  2. Create the input code in the topic.htm file:
    1. Open the topic.htm file and locate the body tags.

      <body>

      <aitdata>

      <input id="footer-modified" type="hidden" value="Last modified: <authorit:sys_modified>" />

      </body>

    2. Create a new line and add the input code for you new div tag.
      1. Save the changes to the topic.htm file.
    • Make sure the input id includes the prefix footer-. The div tag id "modifiedby" becomes "footer-modifiedby".
    • Make sure the variable includes the prefix authorit:. The prefix is required by Author-it because you want to resolve a variable in an external publishing file.
    • Add a text label to the value to identify the content you are displaying. In this case we're adding "Modified by:".

      <body>

      <aitdata>

      <input id="footer-modified" type="hidden" value="Last modified: <authorit:sys_modified>" />

      <input id="footer-modifiedby" type="hidden" value="Modified by: <authorit:sys_modifiedby>" />

      </body>

By default the footer displays the last modified date for the topic, so you need to include the "modified by" variable below it.