Skip to main content

Attributes

Every element has a set of attributes, which are properties that define the element's characteristics. Each attribute has a value, and by changing the value, you can control how Paligo uses the element.

Attributes are handled in the Element Attributes Panel.

Element_Attributes_Panel.jpg

Tip

You can use attributes to filter your content, see Filtering / Profiling.

Every element has a set of attributes, which are properties that define the element's characteristics. Each attribute has a value, and by changing the value, you can control how Paligo uses the element.

Some common examples of how you can use the element attributes are:

  • Set the width attribute of an imageobject to control its size in the output, for example, width: 50%

  • Set the role attribute of a section to accordion so that the section appears as a collapsible section in the output

  • Set the audience attribute of para to developer so that the paragraph only appears in content aimed at developers.

Style with Attributes are handled in the Element Attributes Panel. You can use the advanced search to find components that contain specific attributes and profiling values, see Search for Attributes.

By selecting the element, currently applied attributes and values are shown in the Element Attributes Panel (1). You can add extra attributes from the Add attribute drop-down menu (2). If you add an attribute, you also need to set its value in the field next to the attribute name (1). You can also use the fields to change any existing attribute values. To find out more, see Attributes.

Element attributes

1 = Element attributes panel, 2 = Add attribute drop-down menu

Tip

If a topic contains information about several products, it can be suitable to create Favorite Profiles that contain certain filters and variables to switch on when viewing content or sending content to reviewers or contributors.

Attributes are used for many different purposes in Paligo, including applying filters to your elements to include or exclude content in different scenarios. Many attributes come from the DocBook standard, but there are some Paligo-specific ones too.

To add attributes to an element:

  1. Select the element in the topic.

  2. Place the cursor in the Element Structure Menu below the toolbar.

    Element_Structure_Menu_small.png

    Note

    When you select an element in the Element Structure Menu, Paligo highlights it in yellow.

  3. Select the element and choose Go to element to show the attributes for this particular element.

    Remove_element_attributes_2.png

    The Element Attributes Panel. now shows the attributes for the selected element.

  4. Use the Add attribute search to enter the name of the attribute or scroll through the available options. Search.png

    element-attributes-add.jpg

    In the image above the attribute will be added to a para element .

  5. Select the attribute to be inserted Search.png.

    Note

    You can only add attributes that are valid for the selected element.

  6. Give the attribute a value. Depending on the attribute type:

    • Select a menu option.

    • Enter the value manually in a text-entry field.

    • Check a box in front of a profiling value or Create Profiling Values

    attributeswidget.png
    Profiling values dialog shows a list of profile values, a button to add a value, and cancel and apply buttons.

    To the left - The attribute width has a manually entered size value. To the right - The attribute audience has a list of profiling values to choose from.

  7. Select Save. Save icon.

  8. Repeat this procedure for any other elements that need attributes.

Tip

To remove an element attribute, see Remove Attributes.

To update a profiling value for an attribute, see Add or Remove Profiling Values.

Element attributes are properties that you can add to an element, such as a section or table. There are many different attributes you can use, and you add them in the Element attributes panel (see Style with Attributes). When you add an element attribute, you also have to set its value. Typically, they have one value, but you can add multiple values when needed.

For example, if you want to use the role attribute to assign a class name to a section and also make it collapsible, you would need to add two values. In this case, "accordion" to make it collapsible and then another value for the class name.

To add multiple values:

  1. Use the Element attributes panel to add an attribute to an element.

  2. Enter the values in the field next to the attribute. Separate the values like this:

    • Use a semi-colon to separate values. For example, here, the role attribute is given two role values: accordion and subsection. A semi-colon is used to separate the values.

      role="accordion;subsection;"
      Role attribute has the value: accordion;subsection;
    • Use a colon to separate "keys" from values. "Keys" are properties that can have values. They are only suitable for certain attributes, such as the style attribute that you can give to a table element. For example:

      style="border-style:solid 2px;border-color:blue;"
      style attribute has the value: border-style:solid 2px;border-color:blue;

      Here, the attribute is style. The first key is border-style and it is separated from its value (solid 2px) by a colon (:). The second key is border-color and it is separated from its value (blue) by a colon (:). Each key and value pair is separated from the next by a semi-colon (;).

  3. Select Save. Save icon.

Note

Some attributes allow the space character as a separator. For example, if you add a role attribute and set its value to "specifications table", it will get two class names in HTML when it is published. In the HTML, it will appear as class="specifications table" which means "specifications" is a class and "table" is a different class.

For this reason, it is best practice to avoid using spaces inside a value that you want to become one class. For example, use "specifications-table" as this will be one class, rather than "specifications table" which will be two classes.

Each element in Paligo can have attributes, which are properties. For example, a paragraph could have a role attribute with the value "example-style" so that it can be styled differently from other paragraphs by using CSS. If an attribute is no longer needed, you can delete it.

To remove an applied attribute:

  1. Select the element in the topic.

  2. Place the cursor in the Element Structure Menu below the toolbar.

    Element_Structure_Menu_small.png

    Note

    When you select an element in the Element Structure Menu, Paligo highlights it in yellow.

  3. Select the element and choose Go to element to show the attributes for this particular element.

    Remove_element_attributes_2.png

    The Element Attributes Panel. now shows the attributes for the selected element.

  4. Place the cursor over the attribute in the Element Attributes Panel and select the X to remove it from the element.

    Remove_element_attribute_3_small.png
  5. Select Save. Save icon.

Paligo is based on DocBook 5.1 and supports most of the attributes that are included in that content model. Read more about DocBook 5.1. But there are some differences to consider that Paligo:

  • Uses the <article> element for publication topics, see Supported Info Elements.

  • Uses the <section> for topics.

  • Does not support other root-level elements such as <book> and <set>.

Caution

Paligo also supports some "internal attributes" such as xinfo:image, xinfo:resource, and xinfo:text. These "internal attributes" are created and maintained automatically by Paligo and are used for allocating IDs to elements. You should not edit them.

Every element has a set of attributes, which are properties that define the element's characteristics. For each attribute, there is a value, and by changing the value, you can control how Paligo uses the element. Common usage areas are:

Element attributes panel. The td element is selected and it has a style attribute. The value of the style attribute is set to background-color:bg1

Above Style is the attribute and background-color:bg1 is the value.

Paligo supports the Filter Attributes as well as the following attributes:

Attribute

Description

depth 

Use on the imagedata element to set the image depth (height) value in relation to the viewport. The viewport is the available space for the imageobject. Learn more about Image Sizing.

contentdepth 

Use on the imagedata element to set the image depth (height) value and has no effect on the viewport. The viewport is the available space for the imageobject. Learn more about Image Sizing.

contentwidth 

Use on the imagedata element to set the image width value and has no effect on the viewport. The viewport is the available space for the imageobject. Learn more about Image Sizing.

continuation

To get a continued numbering in sidebars, see Use Numbering in Sidebars.

label

Use on a topic's section element to prevent it being numbered in a PDF output (a value of 0 means no numbering).

language

Use on a programlisting element to set the language for a code sample, see Syntax Highlighting.

role

Use the role attribute with specific values to set Paligo to provide particular functionality, see Role Attribute Values

scalefit

Allows an image to be scaled up or down to fit within available space. If scalefit="1" the image is scaled (with the same factor in both dimensions) so that the graphic will just fit within the available height or width (whichever is more constraining). If any other image size attribute is specified, those attributes determine the graphic size and scalefit will be ignored.

style

Style the background colors for individual individual table cells (td or th) for PDF output, see Style Table Body (PDF).

tabstyle

Style the table element to use compact paragraph spacing, see Set Table Cell Paragraph Spacing.

width 

Use on the imagedata element to set the image width value in relation to the viewport. The viewport is the available space for the imageobject. Learn more about Image Sizing.

xinfo:appid

Use on the section element when setting up context-sensitive help, see Context-Sensitive Help.

The @xinfo: prefix tells that this is an extension attribute.

xinfo:chunk

Use on the section element to instruct Paligo to keep a topic as a separate page in HTML outputs, see Create Subsections.

The @xinfo: prefix tells that this is an extension attribute.

xinfo:keep-together

To control the flow of elements over two pages in PDF outputs, see Soft Page Breaks.

The @xinfo: prefix tells that this is an extension attribute.

xinfo:keep-with-next

To control the flow of elements over two pages in PDF outputs, see Soft Page Breaks.

The @xinfo: prefix tells that this is an extension attribute.

xinfo:outname

Use on the section element to control the URL for the topic when it is converted into a page for HTML outputs. The value that you enter is used as the URL, see Topic File Names.

The @xinfo: prefix tells that this is an extension attribute.

xinfo:pagebreak

To set a hard page break in PDF outputs, see Hard Page Breaks.

The @xinfo: prefix tells that this is an extension attribute.

xlink:href

To make images work as links, see Turn Images and Other Elements into Links.

xlink:show

To override the default link behavior for individual links, see Update Individual Link Behavior.

Tip

To learn how to add an element attribute, see Attributes.

You can use the role attribute with specific values to set Paligo to provide particular functionality. There are many possibilities, including adding class names to HTML outputs, adding extra-responsive features to HTML tables and controlling wrapping in PDF output.

Element attributes panel. The role attribute is added and it has a value of extra-responsive

Tip

If you already have a role attribute, separate the values with a semi-colon.

The following table shows the role attributes and values that you can use in Paligo.

Attribute value

Description

accordion

Use to create a collapsible section. The section title is shown and when the user selects it, the section expands to reveal the content, see Accordions (Collapsible Sections).

column-count

Use to set the number of columns in a sidebar element in PDFs, see Enable Multi-Columns (PDF).

column-gap

Use to set the amount of space between columns in a sidebar element for PDFs, see Enable Multi-Columns (PDF)).

extra-responsive

Use on table elements to set them to add a sticky header and column filter to a table for HTML5 outputs, see Enable Column Filter and Sticky Header.

font-size

Use to set the size of the lettering on a verbatim element, such as programlisting , see Verbatim (code and software).

<free text>

Can be used on any element and you can enter any text as the value, for example, role: online-image. The value is used as a class name in HTML outputs. This only applies if the HTML layout is set to include the role attribute as a class name, see Classes and Attributes HTML5.

img-thumbnail

Use on mediaobject elements to set them as small "thumbnail" images in HTML outputs, see Thumbnail Images.

img-thumbnail-reset

Use on mediaobject elements to prevent them from being presented as small "thumbnail" images in HTML outputs, see Thumbnail Images.

multi-publication-portal

Use on article elements when publishing multiple publications to the same help center, see Multi-Publication Portal.

notintoc

Use on section elements to prevent a topic from appearing in the table of contents in PDF outputs, see PDF Layout Editor Options.

portal-category

Use on the section element to create category panels for topics in HTML help center outputs, see Topics for Category Panels.

promoted-content

Use on the section element to set a topic as "featured content", see Topics for Featured Content.

reuse-range

Use on procedure and orderedlist elements when you want the steps/items to continue the numbering sequence of a previous procedure or list, see Reuse List Items.

swagger-topic

Use on the section element when embedding Swagger/Open API content in Paligo for publishing to:

top-nav-link

Use on the section element to add a link to a topic from the top-navigation menu, see Add Top-Navigation Links to Topics.

wrap-option

Use on verbatim elements, such as programlisting, to control line wrapping, see Verbatim (code and software).

You can use the Emphasis attribute to make the content bold, italic or underline. When adding the emphasis attribute, the text becomes italicized by default. If adding a role, the value (bold or underline) replace the default italicization.

If you want to use another emphasis when using the emphasis attribute, the solution is to use it in combination with the Toolbar buttons or Keyboard Shortcuts.

Important

You can use emphasis on text that already has an inline element, such as code. But it is important that the emphasis element is outside the inline element, for example:

 <para><emphasis><code>code snippet content goes here</code></emphasis></para>
  1. Highlight the text that you want to be bold, italic or underline.

  2. Press Alt + Enter ⏎ (Windows) or Command ⌘ + Enter ⏎ (Mac) to display the Element Context Menu.

    Element context menu shows a search field and a list of elements that are valid at the current position.
  3. Enter emphasis and select it.

    By default the text becomes italicized.

  4. To make it bold or underlined, select the emphasis element or highlight the text that uses it.

    empasis-role-bold.jpg
  5. Add the role attribute and set its value to bold or underline in the element attributes section.

    The italicization will be replaced with the chosen value.

  6. Select Save. Save icon.