This is a tricky one. Sometimes inside a partialLoop we need to access the parent scope and display parent’s variables.

We can achieve that with the following piece of code:

$this->ViewModel()->getCurrent()->getVariable('parentVariable')

Comments