Rules for a specific site

  Written by The Jahia Team
 
Developers
Sysadmins
  rules
   Estimated reading time:
7.1.1.0

How to to set rules for jnt:page node inside a specific site.

Answer

A way to define a specific site can be to check in the path the name of the page:

// Select page with a specific sitename
rule "site name selection"
when
    A new node is created
        - the node has the type jnt:page
        - the path has "ACMESPACE"
then
    Log "Name of page created in ACMESPACE: " + node.getName()
end


The condition created for the path has (This must be inside the rules.dsl):

[condition][]- the path has {value}=path contains {value}

 

To learn more about rules, check this documentation: