Pages” are filters that determine what parts of your application a particular talking point or action should appear on. This allows you to show relevant content as the demo progresses no matter what order the features are shown in.

The pages section of the app gives you a list of all pages and where they are used. To create a new page press “Add a page”. Note: you can also create a new page inline when you’re editing an action or talking point.

Adding a page

Adding a page

Pages have 2 attributes:

  • Page name references the part of your application this page will filter on
  • URL structure contains the filter criteria to determine which URLs in your app will display content limited to this page. There are 5 ways to filter, all of which take a string:
    • contains will show content on any URLs that have the string anywhere in the URL
    • starts with will only show content on any URLs that have the string at the start. This is useful if you have specific subdomains.
    • ends with will only show content on any URLs that have the string at the end. This is useful if there are unique identifiers you want to avoid.
    • matches exactly requires the entire URL (from http…) to match
    • matches regex is an advanced option that treats the string as a regular expression

Regex: using regular expressions

Sometimes your page structure is too complicated to handle with a simple “contains” statement, in those cases you may need to write a regular expression (regex).

Regular expressions have some special characters like [](|)\.?* that dramatically change what happens when matching a string.

Here are some examples:

  • To match across different strings you can use brackets “()” and a pipe “|”. For instance to match user_advanced OR user_settings you could use the regex user_(advanced|settings). You can use the pipe “|” on its own too, so the regex user_advanced|user_settings matches exactly the same strings.
  • To match a string where the part in the middle doesn’t matter, you can use “.". For instance to match user/123/settings OR user/9/settings you could use the regex user/.*/settings. “.” means any character and "” means 0 or more times so this would also match user//settings and user/avocado/settings – if your app happens to have those you can do user/[0-9]+/settings :)
  • To match only strings with certain characters, you can use square brackets “[]”, so to match only numbers you can use [0123456789] or the shortcut [0-9].
  • All strings are valid regex’s, and if they don’t have any special characters then they’ll work like a “contain”. So regex: dashboard is exactly the same as contains: dashboard

Regular expressions are very powerful and these examples only scratch the surface. If you find yourself constructing a very complicated regex, please let us know and we’ll try to help: [email protected]