We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

assets managment working two time in dispatcher forward

Hi, I use phalcon assets management its work perfectly but now ı have a problem.

I define assets items in controllerbase initialize function and output template master index.volt.

I use dispatcher forward if user not login forward to login action. Problem is hear my assets items output two time ?

Just add check for checking ithere is forward - if yes, don't add it again to assets.



3.7k

how can I do that ?



145.0k
Accepted
answer
edited Oct '16

if(!$this->dispatcher>wasForwarded())