crafter-cms

Running a controller code for all the pages using Content Inheritance


We want to run a common controller(groovy) code on all the pages. Can I set up Content Inheritance by using a controller using level-descriptor?


Solution

  • Yes you can. Create a node selector with variable name scripts in the level descriptor content type (aka Section Defaults). Then in the Section Defaults, from the node selector, select the script you want to execute on every page.