Highlighter – Lesson 3 – Create Page Set

Training Objective

Tell the Schema App Highlighter how to find all of the pages that will require the same markup.

Highlighter Create page set

Now that you’ve highlighted your content, you want to tell the Schema App Highlighter which pages you want to apply the highlights to.

There are 3 options:

  • List URLs
  • Define Pattern
  • Define XPath

Each option is a different method of defining the page set for your Template

Option 1: List URLs

This option allows you to use a list of specific URLs to define the page set. This option might make sense if the URLs don’t change over time but if you are constantly adding products, services, blogs, etc., to your website, it isn’t the best choice.

Option 2: Define Pattern

This option allows you to define a URL segment pattern to define the page set.

For example: /news/**

The first “/” tells the Schema App Highlighter to ignore everything that comes before the “/”. The asterisks tell the Highlighter to apply the rules to everything that follows “news/”.

Process:

  1. Define URL segment pattern
  2. Click “Add URL Examples”
  3. Add URL examples
  4. Click “Validate URLs”
  5. Check that the URLs are Valid

A red “x” indicates that pages are not valid. If a URL does not validate it means that it does not match the indicated URL pattern. You’ll have to correct this before moving on, whereas a checkmark indicates that pages are valid

  1. Click “Next”

Option 3: Use Defined XPath

1. Decide which element in the page to use

Choose an element on the page that is common to all pages that share the same template. For example, if you were marking up blogs, you might use the blog author’s name or if you were marking up products, you might use the Item # – anything that is unique and consistent to all similar items.

2. Once you know which element you’d like to use, you can right-click on it and choose “Inspect”.

3. Ensure you’ve found the correct element and then right-click, choose “Copy”, then “Copy XPath”.

4. Paste the XPath underneath where it says “Xpath”

5. Test with at least 3 URLs by clicking “Review URLs”

When using a defined X-path, it’s a good idea to review a couple pages that you do not expect to find that x-path on. That way you can confirm that the template is also invalid on pages where the x-path would not be present.

6. If all looks good, then click NEXT

Ready to for Highlighter Lesson 4 - Review Highlights?

Menu