Keep in mind that pluggable applications are designed to only work with the
primary engine, that's the reason why a Kajiki `master.xhtml` is always
placed inside your project even when you quickstart with a different
engine. That is placed there to allow pluggables to work.

That aside pluggables should do no trick to the template renderer, all
templates get rendered like they were inside the main application (the one
the pluggable is attached to) so the jinja environment should be the one of
the main app.

On Wed, May 17, 2017 at 3:24 PM, Mattia Meleleo <mele...@hotmail.it> wrote:

> Hi,
>
> I am trying to create a pluggable application, i 've launched the
> quickstart-pluggable inside the root folder of the main project and i
> installed and plugged the newly created app in my main project.
>
> My issue is that i don't know how to extend a jinja template to my
> master.jinja file inside the main application from my pluggable app since
> jinja's environment is limited to my pluggable app.
>
> This is my index.jinja file that i expose in my pluggable index:
>
> {% extends master.jinja %}
> <head>
>     <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
>     {% block master_title %}
>     <title>User profile</title>
>     {% endblock %}
>     <link rel="stylesheet" type="text/css" media="screen"
> href="{{tg.url('/_pluggable/userprofile/css/style.css')}}" />
> </head>
>
> <body>
>     {% if request.identity %}
>     <div>Hi {{ request.identity['user'] }}</div>
>     <div id="hello_box">
>         <img src="{{ 
> tg.url('/_pluggable/userprofile/images/avatar_default.png')
> }}"/>
>         Hello from, {{ h.userprofile(sample.name) }}
>     </div>
>     <div>{{ h.call_partial('userprofile.partials:something',
> name='Partial') }}</div>
>     {% endif %}
> </body>
> </html>
>
> Is it possible to specify multiple template environments for jinja?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to turbogears+unsubscr...@googlegroups.com.
> To post to this group, send email to turbogears@googlegroups.com.
> Visit this group at https://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to turbogears+unsubscr...@googlegroups.com.
To post to this group, send email to turbogears@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to