Page tree
Skip to end of metadata
Go to start of metadata

Rule

Field Page Path example

For Pages

Let's have this page hierarchy:

In Labelomat plugin path to Baz page is resolved as String:

Foo Space Home/Foo page/Bar page/Baz page


So to specify page Baz page in field Page Path, you can use this regex:

([\w ]+\/){3}Baz page

In Labelomat plugin it looks like this:

You can use online tool like https://regexr.com/ for creating regular expression and check it against some value.

Example above looks as follow:


For BlogPost

Let's have this page hierarchy:

In Labelomat plugin path to Baz Blog is resolved as String:

2020/02/20/Baz Blog

So to specify page Baz page in field Page Path, you can use this regex:

([\w ]+\/){3}Baz Blog

In Labelomat plugin it looks like this:

You can use online tool like https://regexr.com/ for creating regular expression and check it against some value.

Example above looks as follow:

For Comments and Attachments

We could say that attachments and comments exists in pages or blog posts in other words they exists in containers. So if rule contain condition with content entity type set to comment or attachment, field page path takes value of attachment's/blog post's container's path.

Example

Let's have condition with name FooCondition and it has field Content Entity Type field set to attachment. Now let's have a rule with field Conditions set to "FooCondition" and Page Path set to ([\w ]+\/){3}Baz Blog.

This rule will take into consideration only those attachments that are in Pages or Blog Post that have path: ([\w ]+\/){3}Baz Blog

Field Conditions

This field can contain names of condition in quotes together with logical operators &, | and parentheses (,) used for precedence.

Example

Let's have conditions with name Foo condition, Bar condition, Baz condition. All three condition has Content Entity Type set to Page.

The Conditions field accepts names of conditions in quotes and you can also use logical operators & (and), | (or)  to create logical equations.

To specify that we want to label page only when Baz condition or both Foo condition and Bar condition are resolved as true, use this logical equation:

"Baz condition"|("Foo condition"&"Bar condition")

Here expression ("Foo condition"&"Bar condition") will be resolved first because it is in parentheses and therefor has higher precedence.

In Labelomat plugin it looks like this:

Wrong examples

Different Content Entity Type

Let's have conditions with name Foo condition, Bar condition. Condition Foo condition has field Content Entity Type set to Blog and condition Bar condition has field Content Entity Type set to Page.

Now if field Conditions is set to:

"Foo condition"&"Bar condition"

Labelomat will print error message because these two conditions has different value in field Content Entity Type.

Invalid character

If there is invalid character in field Conditions, Labelomat will print error.

Let's have conditions with name Foo condition. Condition Foo condition has field Content Entity Type set to Blog.

If you write for example:

"Foo condition" test

Labelomat will print error message, because outside of quotes only characters &,|,(,) and whitespace are permitted.

Conditions

Events are old

This field contains two values.

First value is list where you can select value Less than or More than.

Second value is time period, where you can write values below:

Time UnitYearMonthDayHourMinuteSecond
Value in LabelomatYMDHmS

You can use subset of these values, but keep them in order.

Together they represent interval during which the events happened.

Examples:

To express that you are interested in events that are younger than one year and six months use:

To express that you are interested in events that are older than one month and fourteen days use:


To express that you are interested in events that are younger than two years, two months, two days use:



  • No labels