Adding own macros after migration
- DavidTheNewbie
- Member | 79
Hi guys. I would like you help. I am migrating from 2.1.9 to 2.2.2
I have my own macro registered like this under 2.1.9. So far so good, fully working:
File: MyMacros
With 2.2 in place, I have newly successfully targeted the macro file via:
After an attempt to migrate to 2.2 (with fixed namespaces):
File: MyMacros
Unfortunately, I get:
Fatal Error – Call to undefined method Latte\Macros\CoreMacros::includeTemplate()
The thing with the partial macro is that the CoreMacros::includeTemplate(…) function is gone with 2.2. Is there anything similar to the CoreMacros::includeTemplate(…) function from 2.2?
I have tried to substitute the missing function by:
File: MyMacros
It partially did the trick but cannot be used as it apparently cannot detect default Nette macros:
User Error – Exception in Nette\Bridges\ApplicationLatte\Template::__toString(): Unknown macro {link} in …/partials/file.latte:31 in /var/www/html/…
Would you be so kind as to point me in the right direction? I fail to find anything similar in the 2.2 docs.
Last edited by DavidTheNewbie (2017-02-12 12:29)