subtree

Type: string
Default: ''
Context: prediction, questions

About this parameter

Control whether only pages under a certain branch of the site should be displayed. For example: data-subtree="/gata--park/" then only shows pages under the Street & park tab. The parameter makes it easy to set up recommendations on review pages or web parts.

If you want to add several strings to be used when selecting pages, you can separate them with a "," This example shows pages both under Street & park, but also Housing:

<div class="rek-prediction" data-subtree="/science/,/accommodation/"></div>

It is possible to automate how these are created by using: data-userootpath="true" data-rootpathlevel="1". So please see these parameters as well: Userootpath

Make sure a url starts with the subtree

By adding a caret "^" before the subtree it will be required that the url starts with exactly that path:

<div class="rek-prediction" data-subtree="^/science/></div>

Usage examples

<div class="rek-prediction" data-subtree="school"></div>