Skip to main content

Mark Up Elements for Filtering

Before you can apply filtering to your publications, you need to tell Paligo what elements can be filtered, and what filter conditions apply. You can do this by "marking up" the elements that you want to filter.

To mark up your content, you can select an element and then apply a filter attribute and a filter value. The filter attribute tells Paligo which type of filter to use, and the filter value sets the condition for the filter.

element-para-os-windows.jpg

Element (1), filter attribute (2), filter value (3).

Paligo does not have one generic filter for everything. Instead, it has a range of filter types, called Filter Attributes. There are different filter attributes for filtering by product name, by audience, by country, and by market, among others.

Note

Marking up the content tells Paligo what content can be filtered. It does not apply the filter. You apply the filter in the publishing settings when you publish the content.

  1. Edit the topic that contains the element you want to filter. Select any part of the element so that it is shown in the Element Structure Menu.

  2. In the Element Structure Menu, select the element you want to filter and then select Go to element.

    select-step-element.png

    Tip

    If you want to filter text inside a paragraph, and not the entire paragraph, highlight the text and add the phrase element to it. You will then be able to apply the filter attribute and value to the phrase element so that it can be included/excluded when you publish.

  3. In the Element attributes section, select Add attribute and search for the filter attribute you want to use. Note that the Add attribute list includes all attributes, not just filters

    There are many different types of profile attribute (filter) that you can use, including product name, country, and audience. To find out about the different profile attributes, see Filter Attributes.

    select-filter-attribute.png
  4. Use the Profiling values dialog to set the filter value. Think of setting the value as a way of telling Paligo where the content is applicable.

    For example, if you have a paragraph that is only applicable to a product named "ACME 1050", you could give it the xinfo:product filter attribute and set the filter value to ACME 1050.

    You can have single values or you can add multiple values, where Paligo will include the content if either of the values are a match.

    Choose from any of the available values or use Add value to create more values if needed.

    profiling-values.png

    Note

    We have included some more detailed examples of how you can use filter conditions to include and exclude content at the end of this section.

  5. Repeat steps 2-4 inclusive to apply filters to as many elements as needed.

You have now set the profile attributes and values for the content you want to filter. We recommend that you preview the filters to see how they work before you publish.

Example 1. Use multiple filter values to create an OR filter

Let's say you have a paragraph that is only applicable for customers in North America and the EU. You want to include the paragraph when you are publishing to those markets, but want to exclude it when you are publishing to the Middle East, Australia, and other markets. This is where you need an OR filter, as you want the content to appear when the market is North America OR the EU.

To mark up the paragraph, you:

  1. Select the para element.

  2. Add the xinfo:market attribute in the Element Attributes Panel.

  3. Set the attribute value.

FILTER-MARKET-EUNORTHAMERICA.jpg

When you publish the content, you can choose the filters for the publication.

FILTER-MARKET-PUBLISH.jpg
  • If you set the publication's market filter to North America, EU, or both North America and EU, the filtered paragraph is included.

  • If you set the publication's market filter to another region, such as Australia, the filtered paragraph is excluded.

  • If you do not set a market filter for the publication, the filtered paragraph is included. It is only excluded from the publication if the market filter is applied and the value for the market filter does not match North America or EU.


Example 2. Exclude a filter value rather than include it

Paligo's filtering is inclusive, which means that when you set a filter, you are telling Paligo what content you want to be included in the output. But there may be times where you want to exclude certain content rather than include it. For these situations, set up filter values for:

  • The conditions where you want the content to be included

  • The conditions where you want the content to be excluded.

Then, when you publish, you can tell Paligo which content to include. By including one condition, you automatically exclude the other possible conditions.

Note

The "inclusive" filtering strategy may take a while to wrap your head around if you are new to filtering or if you come from another environment where you used filters for both including and excluding specifically. But once you get the idea, the inclusive strategy is very powerful in that it can accomplish exactly the same, but with a much cleaner structure, so you will have a more robust long-term solution.

Let's say you have three types of users: administrators, engineers, and operators. You have a paragraph that you want to be included for the engineers and operators, but excluded for the administrators. To set this up you:

  1. Select the para element.

  2. Add the audience attribute.

  3. Select the value for the audience attribute and create these values: "administrators", "engineers", "operators".

    Note that it is important to create values for where you want the content to be included and also for where you want it to be excluded.

    profiling-values-audience-add.jpg
  4. Set the audience attribute value to "engineers" and "operators".

    profiling-audience-engineers-operators.jpg

When you publish the content, you can choose the filters for the publication.

To publish for the administrator audience, you set the audience to "administrators".

publish-administrators-audience.jpg

The published output will then include:

  • Any content that has an audience filter with a value of "administrators". The paragraph that you marked up has an audience filter with a value of "engineers" and "operators", and so it is not included in the published output.

  • All content that does not have an audience filter

To publish for the engineers or operators, you set the publication's audience filter to "Engineers" and "Operators".

publish-engineers-audience.jpg

The published output will then include:

  • Any content that has an audience filter with a value of "Engineers" or "Operators". So the paragraph that you marked up is included in the published output.

  • All content that does not have an audience filter.