I would like to know how to make my module load it's tpl file only on certain administration panel page.
To be more precise on pages where one can locate customer address fields.
I have the hook already:
public function hookDisplayBackOfficeFooter()
{
return $this-> addExtraField();
}
But the issue is, that it runs on every single page, which is not the best practice, thus I need some kind of evaluation to put in place.
To render your fields based on page condition, use the below code:
public function hookDisplayBackOfficeFooter()
{
if ($this->context->controller == 'updateaddress') { // Your controller name
return $this-> addExtraField();
}
}