Include class & ID attributes in tags for HTML & XHTML files

Publish

Platform_KC
On Premises

In published HTML and XHTML files, tags for paragraphs, headings, and File objects include Class and ID attributes.

  • A class attribute has been added to the published files for File objects so it includes the template description when a File object is based on a template.
  • An ID attribute has been added to paragraphs, headings, and File objects.

Attribute description for the template

A class attribute has been added to the File object. The value of this is the File object template name, with any illegal characters removed, and shown in lower case.

For example, in the screen shot the class attribute is added after the source attribute:

<img id="f830" src="830.gif" class="ebeddedimage

Note: This is the format already used for the class attribute on the hyperlink object.

Attribute example and descriptions for ID

The following example shows how the ID attribute is constructed in the published output file. This is named xnnnn_i where:

  • x is the object type
  • nnnn is the relevant Author-it Object ID
  • and i is an integer that is added when the id appears more than once on a page

The values for x and nnnn are as follows:

  • For headings: t, topic ID (for example, h2 id="t827" - where x is "t" and nnnn is "827")
  • For paragraphs: p, text block ID (for example, p id="p583")
  • For File objects: f, object ID (for example, img id="f830")

    Published HTML and XHTML Tags

Note: This format already exists for hyperlinks, where h is the object type followed by the hyperlink object ID.