Skip to main content

Top-Navigation for Help Centers

You can use the top-navigation feature to add a header to the top of your HTML5 Help Center outputs.

In the header, you can add quick links to important topics in your help center, such as "Getting Started", and you can also add links to external sites, such as your corporate website. You can choose to add links only to external sites, only to topics, or have a mix of both.

Paligo HTML5 help center output. There are three top-navigation menus in the header of the page.

Note

The top-navigation links are only available in HTML5 Help Center outputs.

You can use the top-navigation feature to add a header to the top of your HTML5 Help Center outputs.

grandhild2-numbers.png
grandchild1.png

In the above publication, "The Mission Control Center" has a link in the top-navigation header. The Top navigation depth is set to 3, which means that there is a sub-menu for topics two levels down from "The Mission Control Center". At level 2, there is "Command Center", "Guidance System", and "Ground Segment". At level 3, there is "Controls System" and "Control Room".

To enable top navigation in your HTML5 output:

  1. Select Layout in the top menu.

    Paligo editor. The Layout option in the header menu is highlighted.

    Paligo displays a list of Layouts. The list is empty if there are no custom Layouts in your Paligo instance.

  2. Select the Layout you want to update or Create a Layout.

    Tip

    You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.

  3. Select Classes and attributes in the sidebar.

    Classes_and_Attributes.png
  4. Select Enable for Output taxonomies.

    Output_Taxonomies.png
  5. Select Enable for Output 'role' attribute as class names.

    Layout. Output role attribute as class names setting. It is set to Enable.
  6. Select TOC and chunking in the sidebar.

    TOC_and_Chunking_Menu.jpg
  7. Select Enable for Top Navigation.

    top-navigation-enabled.png
  8. Set the number of levels to show in Top navigation depth .

    Top_Navigation_Depth.png
    • Set it to 1 to only include a link to one specific topic (parent topics).

    • Set it to 2 to include a link to the specific topic and subtopics (child topics).

    • Set it to 3 to also include links to "grandchild" topics".

  9. Select Save.

With a customized JavaScript (JS) file, you can add a second drop-down menu in the top navigation for HTML5 output. This can be useful if you have several products with multiple versions of each product.

For this to work, it is required to create one layout per product. However, the same JS file (with a list of all the products) can be reused for all the layouts that share the same product selector. Each product's help centers will only show versions added to its layout, see Add Available Versions.

Dual_Top-navigation_Menus_small.jpg

To prepare the JS file to create a second dropdown menu that changes depending on selected product:

  1. Use a code editor or text editor to create a JS file. Give it a name and save it with the .js extension.

    If you already use a custom JS for your layout, you should edit that JS file instead.

  2. Add the following template code to your JS file:

     $(document).ready(function () {
        // Create product dropdown using jQuery
        const productDropdown = $('<li class="product-dropdown">')
            .html(`
            <a><span class="caret"></span>Select product</a>
            <ul>
                // BEGIN - Add product versions
                <li><a href="#">Product A</a></li>
                <li><a href="#">Product B</a></li>
                <li><a href="#">Product C</a></li>
                // END - Add product versions
            </ul>
            `);
        
        // Select the right navbar
        const navbar = $('#navbar').last().children().first();
        const versionDropdown = navbar.children().first();
    
        // Placing productDropdown before versionDropdown
        versionDropdown.remove();
        navbar.append(productDropdown);
        navbar.append(versionDropdown);
    
        // SmartMenus jQuery initialization
        navbar.smartmenus();
    });
  3. Update Product A with a URL and a proper name.

    The following string is to be updated:

    <li><a href="#">Product A</a></li>

    with a URL and a proper product name, like this:

    <li><a href="https://mydomain.com/docs/myproduct">My product</a></li>
  4. Repeat this for Product B and C. Add or remove products if needed.

  5. Save your JS file.

  6. Upload your customized JS file to each layout that share the same product selector, see Upload Customized JavaScript.

To have the top-navigation showing available versions, you have to add them in the Help Center Theme Options in the Layout Editor.

To set a list of specific product versions in the version dropdown, you need separate layouts. You can reuse the same JS file for all the layouts that share the same product selector, see Enable Dual Top-Navigation Menus.

Important

To display the second top-navigation menu, you need to add at least one version in Versions for version dropdown in the Layout Editor.

If no versions have been added, it will not work to Enable Dual Top-Navigation Menus even if the JS file is uploaded.

  1. Select Layout in the top menu.

    Paligo editor. The Layout option in the header menu is highlighted.

    Paligo displays a list of Layouts. The list is empty if there are no custom Layouts in your Paligo instance.

  2. Select the Layout you want to update or Create a Layout.

    Tip

    You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.

  3. Select Help Center Theme Options in the sidebar.

    Help_Center_Theme_Options_menu_option.jpg
  4. Enter available versions in Versions for version dropdown for this specific product.

    The text is the visible part in the dropdown. Divide the versions with semicolon. For example:

    text:4.0, url:https://mydomain.com/docs/rpa/4.0/;
    text:3.0, url:https://mydomain.com/docs/rpa/3.0/;
    text:2.0, url:https://mydomain.com/docs/rpa/2.0/;
    text:1.0, url:https://mydomain.com/docs/rpa/1.0/;
    Versions_for_version_dropdown.jpg

    Each version must be published. Version number and URL:s must be added in this field.

  5. Select Save.

Tip

To show all product versions in the same top-navigation menu, the JS file is not needed and the the second top-navigation menu will not be used. This is only suitable if you have two or three products.

Add all versions to the same layout. Combine the version with the product name (for example "RPA 2.0" or "PD 3.0).

Versions_for_dropdown_small.jpg

This field is found under Help Center theme options in the Layout Editor.

This approach results in a dropdown menu like this:

Select_version_dropdown_small.jpg

The dropdown will show all versions for all products.

The table below shows examples of the translation strings supported by Paligo and useful for external links. These terms are translated into supported languages automatically by Paligo.

Translation String Identifier

English term shown in top-navigation

LegalNotice

Legal Notice

QandASet

Frequently asked questions

Qandadiv

Q&A

Notice

Notice

Reference

Reference

featured.content

Featured content

contact.support

Contact support

sign.up

Sign up

log.in

Log in

Example 1. How translation strings work

Imagine that you want to add a "Contact support" link to the top-navigation header that is to be published automatically to English and French.

  1. You set Top navigation to Enabled in the Layout Editor

  2. In the External top navigation links section, you add:

    text:contact.support, url:https://yourwebsite.com/contact;

    You use "contact.support" as it is one of the translation strings that are available in Paligo.

  3. You set Use translation strings for external top navigation link text to Enabled.

  4. When published to:

    • English, the link text added to your top-navigation header is Contact support

    • French, the link text added to your top-navigation header is Contactez le support

    The contact.support link is translated into French automatically, as you used a translation string.