Hi guys, just a quick question. is there a way to extend a view template in AppView class?
I’m looking for a solution on not repeating any code that I put in my template.ctp file that looks like this:
and want to move it to AppView so I could just define like, if ($this->requests->controller) are Pages, Dealers, or whatever so I could use that extend statement there…
admad [7:52 PM]
@Neil you can try overriding View::_evaluate() and adding the `extend()` call before `include` statement
admad [7:56 PM]
but thats hackish and you could end up with a loop if not careful
so will need proper checks to decide when to extend