Thanks a lot for your help, this might solve my problem! Best,
Le samedi 29 octobre 2022 à 17:42:06 UTC+2, [email protected] a écrit : > On Fri, 28 Oct 2022 at 15:42, Maxime Garnier <[email protected]> > wrote: > > > > Could I get a bit more detail on how to put the function in > GLOBAL_CONTEXT and how to call it from a page please ? > > def foo(bar): > return bar + " world" > > GLOBAL_CONTEXT = {"foo": foo} > > You can use this as ${foo("hello")} within a Mako template or {{ > foo("hello") }} from a Jinja template. > > -- > Chris Warrick <https://chriswarrick.com/> > PGP: 5EAAEA16 > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/374e3f94-5032-4787-9b87-22d7087e3f0en%40googlegroups.com.
