From e9ea1fd8de22b300ba0322ee3c727e851655c094 Mon Sep 17 00:00:00 2001 From: Ryan Matthew Pierson Date: Sun, 15 Jul 2018 13:56:25 -0500 Subject: [PATCH] Added documentation for onTwigLoader https://github.com/getgrav/grav-learn/issues/356 --- pages/04.plugins/03.event-hooks/docs.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/04.plugins/03.event-hooks/docs.md b/pages/04.plugins/03.event-hooks/docs.md index bb3bdf833..11b1513d8 100644 --- a/pages/04.plugins/03.event-hooks/docs.md +++ b/pages/04.plugins/03.event-hooks/docs.md @@ -37,6 +37,7 @@ Most events within Grav fire in a specific order and it is important to understa 1. [onBeforeDownload](../event-hooks#onBeforeDownload) 1. [onPageFallBackUrl](../event-hooks#onPageFallBackUrl) 2. [onMediaLocate](../event-hooks#onMediaLocate) +1. [onTwigLoader](../event-hooks#onTwigLoader) ## Core Grav Event Hooks @@ -229,3 +230,7 @@ If a route is not recognized as a page, Grav tries to access a page media asset. #### onMediaLocate Adds support for custom media locations for excerpts. + +#### onTwigLoader + +Adds support for use of namespaces in conjunction with two new methods in Twig class: `Twig::addPath($path, $namespace)` and `Twig::prependPath($path, $namespace)`.