how to load cache variables into templates

alnux
Member | 139
+
0
-

The question is how to load cache variables (made into presenters side) into latte templates, there is a {cache} macros but i dont understand at all the documentantion.

thanks

Last edited by alnux (22. 5. 2017 17:20)

matopeto
Member | 395
+
+1
-

Hmm.. as normal variable?

 // Retrieve your variable from cache in presenter
 $value = $cache->load($key);

 // Send it to template
 $this->template->cachedVariable = $value;

Last edited by matopeto (22. 5. 2017 17:45)

RSS feed Topic closed