Skip to main content

Question and Answer Lists

With question and answer lists (Q & A), you can provide your readers with answers to popular questions, all in one topic. These are useful for FAQ-style topics (Frequently Answered Questions).

Tip

If there are a high number of questions and answers, it can make your FAQ difficult for readers to use. For this reason, it is a good idea to limit your FAQs to popular questions only, and cover more specific questions elsewhere in your content.

Of course, you could take that approach to all of your "customer questions" and make sure they are answered in your regular content. Then there may be no need for an FAQ at all.

To create a topic containing a question and answer list (FAQs):

  1. Create a new topic or edit an existing one by selecting it in the Content Manager.

  2. In the topic, use the element context menu to add the qandaset element. This is the "container" element for all of your questions and answers.

    When you add a qandaset element, Paligo automatically adds some of the "child" elements that it needs for your questions and answers.

    qandaset-1-pair-questions.jpg

    The structure is:

     <qandaset>
        <qandaentry>
          <question>
            <para><?placeholder Insert text?></para>
          </question>
          <answer>
            <para><?placeholder Insert text?></para>
          </answer>
        </qandaentry>
      </qandaset>

    The important things to note here are that:

    • The qandaset is the "container" element for all of the questions and answers

    • Each question and answer pair go inside a qandaentry element

    • Each question consists of a question element and a para element inside it. You add your text inside the para element.

    • Each answer consists of an answer element and a para element inside it. You add your text inside the para element.

  3. Enter your text for the question and the answer.

  4. To add another question and answer in the same list, you need to position the cursor carefully. It has to be below the answer and at the position where qandaset is the last element shown on the element structure menu.

    FAQs-2ndquestionandanswer-position.jpg
  5. Use the element context menu to add the qandaentry element.

    To access the element context menu, press Alt and Enter (Windows) or Option ⌥ and Enter (Mac).

    add-qandaentry.jpg

    Paligo adds an extra question and answer pair.

    added-second-q-and-a.jpg

    Note

    If the element context menu does not allow you to search and find the qandaentry element, it is because the cursor is not in the correct position. Go back to step 4 and make sure that the cursor is in the correct place.

  6. Repeat steps 3-5 inclusive to add all of the questions and answers for your list.

  7. Select any part of the list and then select the qandaset element in the element structure menu.

  8. In the Element attributes section, add the defaultlabel element and set its value to either:

    • none

      The questions and answers will have no prefix. The question text is bold and the answer is regular text.

    • number

      The questions are numbered.

    • qanda

      The questions have a Q: prefix and the answers have an A: prefix.

    qandaset-attributes.jpg
  9. Select Save. Save icon.

When you publish your topic, the list will appear as a question and answer list. The questions will use the formatting that you set for the defaultlabel attribute.

Tip

When publishing to HTML5, Paligo adds a list of links before the Q and As. The links have the same text as the questions.

FAQ_default_HTML5_layout_2_small.png

Add the below code string at the end of the layout CSS to:

  • Hide the links before the Q and As.

  • Add a space between the Q and A labels and the text.

  • Add spaces between the Q and As.

/* Styling for Q&A sets*/
div.qandaset ul
{display:none;  /* hides links Q-title */
}
div.qandaset
{margin-bottom:15px; /* space between Q&A set */
}
div.qandaset tr td p
{margin-bottom:5px; /* space between Q & A rows */
}
div.qandaset tr td:first-child 
{padding-right:5px; /* space after labels (e.g. "Q:")*/
} 

By default, question and answer lists (FAQs) are numbered, as defined in DocBook XML. If you prefer, you can set your question and answer lists to have no numbering or to use Q: and A: prefixes instead.

To control the numbering:

  1. Edit the topic that contains the qandaset list. Select any part of the list and then select the qandaset element in the element structure menu.

    qandaset-selected-element-structure-menu.jpg
  2. Use the Element attributes section to give it the defaultlabel attribute, and set the value of the attribute:

    • none

      The questions and answers will have no prefix. The question text is bold and the answer is regular text.

    • number

      The questions are numbered.

    • qanda

      The questions have a Q: prefix and the answers have an A: prefix.

    qandaset-attributes.jpg
  3. Select Save. Save icon.

When you publish the topic, the qanda list will use the formatting you have selected.

If you have lots of questions and answers (FAQs), you may want to group them into different categories rather than have one long list. To do this, use the qandadiv element.

Note

If you decide to use qandadiv sections, you need to use them for all of your questions. You cannot have a mix of some questions inside a qandadiv and some not (this is because it is not supported by the content model).

To add sections and titles in your question and answer lists:

  1. Create a Q & A List.

    Your qandaset list should have a structure where qandaset is a parent element, with qandaentry as a child. Your questions and answers should be children of the qandaentry.

    qandaset-nodivs.jpg

    Note

    In this procedure, we explain how to add qandadiv sections to an existing qandaset. But if you are creating a qandaset from scratch, you can insert the qandadivs as you go along instead.

  2. Select any part of the question and answer list and then select the qandaset element in the element structure menu. Then select Go to element from the menu.

    qandaset-gotoelement.jpg
  3. Use the element context menu to add the qandadiv element inside the qandaset element.

    To access the element context menu, press Alt and Enter (Windows) or Option ⌥ and Enter (Mac).

    If the qandadiv option is not available in the list, then the cursor is in the wrong position. Go back to the previous step and make sure you have selected the qandaset element.

    When you add a qandadiv element, you can add a range of other elements inside it, as well as the qandaentry elements. Typically, you will want to use a title inside the quandadiv to give the section a heading, and then you can also add other elements if needed, such as a para.

    Paligo's element context menu provides a list of the elements that are valid at the currently selected position. To find out more about the individual elements, refer to the Supported Attributes.

  4. Use the XML tree view to drag and drop the elements you want to be inside the qandadiv part of your list. Your qandaentry elements need to be inside a qandadiv, as well as any additional elements you want inside the qandadiv, such as a title and para.

    XML tree view shows the structure that's needed for a qandaset with qandadivs. The image shows qandaset contains several qandadivs. Inside each qandadiv, there is a title and a qandaentry. Inside the qandaentry there is a question and answer.

    Note

    When using qandadiv elements, all qandaentry questions and answers need to be inside a qandadiv.

  5. Repeat steps 2-4 for any further qandadivs.

  6. Select Save. Save icon.

When you publish the topic, it will look something like this (HTML version shown):

qandadiv-html5-output.jpg

Where you get:

  1. A list of all the qanda sections and the questions in those sections

  2. Sections of questions, where each section is a qandadiv element. In the image shown, the sections also have titles.

  3. A list of the questions in that section

  4. The questions and answers in that section

For PDF outputs, you do not get the extra lists, only the sections and the questions and answers.

Note

To set numbering or letting for the questions and answers, see Control Numbering on Q & A Lists. To control the numbering and/or styling of the qandadivs and their lists, use CSS. For PDFs, a customization may be required, please contact customer support for details.

Example 1. Sample topic showing valid XML structure for qandaset that uses qandadiv elements

The following XML shows valid structure for a qandaset that uses qandadivs, each with a title and a single question and answer. Note that we have removed the XML ids from the code. If you use the source code editor and then copy and paste this into a Paligo topic , when you save it, Paligo will generate the XML ids automatically.

In the structure, note that every question and answer is inside a qandaentry. Each quandaentry is inside a qandadiv, and all of the qanda-related elements are inside the qandaset element, which acts as a "container".

<?xml version="1.0"?>
<section>
  <title>ACME 100 Troubleshooting</title>
  <para>This article provides answers to some of the most common questions about ACME 100. To find an answer, go to the section that relates to your type of problem and then look to see if your question has been answered.</para>
    <qandadiv>
      <title>Battery Troubleshooting</title>
      <qandaentry>
        <question>
          <para>How long is the battery life?</para>
        </question>
        <answer>
          <para>With normal use, the battery should last around 10 hours before it needs recharging.</para>
        </answer>
      </qandaentry>
      <qandaentry>
        <question>
          <para>When will I need to replace the battery?</para>
        </question>
        <answer>
          <para>Typically, batteries last around 2 years with normal usage.</para>
        </answer>
      </qandaentry>
      <qandaentry>
        <question>
          <para>How do I get a replacement battery?</para>
        </question>
        <answer>
          <para>Batteries and chargers are available on our website.</para>
        </answer>
      </qandaentry>
    </qandadiv>
    <qandadiv>
      <title>Controls Troubleshooting</title>
      <qandaentry>
        <question>
          <para>How do I change the temperature controls?</para>
        </question>
        <answer>
          <para>Go to Controls &gt; Temp &gt; Limits to change the temperature limits for the automatic temperature controls. For manual temperature controls, go to Controls &gt; Temp &gt; Manual.</para>
        </answer>
      </qandaentry>
      <qandaentry>
        <question>
          <para>How do I control the vents?</para>
        </question>
        <answer>
          <para>Go to Controls &gt; Vents &gt; to open or close the vents. Note that you cannot control the vents if they are set to be automatically controlled (see Auto &gt; Vents).</para>
        </answer>
      </qandaentry>
    </qandadiv>
    <qandadiv>
      <title>Monitor Troubleshooting</title>
      <qandaentry>
        <question>
          <para>How do I monitor the temperature differences over a day?</para>
        </question>
        <answer>
          <para>Go to Dashboard &gt; Temp to view the temperature charts. You can set the charts for 1 day, 1 week, 1 month, or 1 year of data.</para>
        </answer>
      </qandaentry>
      <qandaentry>
        <question>
          <para>How do I monitor the effects of cooling?</para>
        </question>
        <answer>
          <para>Go to Dashboard &gt; Cooling to view the cooling charts. You can set the charts for 1 day, 1 week, 1 month, or 1 year of data.</para>
        </answer>
      </qandaentry>
    </qandadiv>
  </qandaset>
</section>