I spent a while trying to identify this ‘special variable’ in the documentation. I had a case where I wanted to be able to pass the root hash to a macro which would operate on it. I found references to Environment.getCurrentEnvironment() but that works in Java not templates. How do you pass the root data model to a macro?
I spent a while trying to identify this ‘special variable’ in the documentation. I
Share
Below is a unit test that successfully does what I was after. The key was the ‘.data_model’ variable.