developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 10 years ago

Closed 10 years ago

#1196 closed bug (fixed)

include tpl plugin does not work with meta tpl plugin of included template

Reported by: bricet Owned by:
Priority: normal Milestone: Jelix 1.2.2
Component: jelix:tpl Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

When using {include 'tplSel'} in a template, 'tplSel' should be included.

But for now, only the content of the plugin is included, not metas (jTpl have a special behaviour to handle them).

I'm not a jTpl expert, but the best solution I found was to hard-code the include plugin in jTplCompiler (recursivelly) as a first thing.

Set for "jelix:tpl" component, but also concerns jTpl standalone.

Here is the patch.

PS : there should still be a "bug" with this include, which is the use of checkCacheFiletime. Not really sure this applies to tpl though. Anyone can confirm ?

Attachments (2)

ticket_1196.patch (2.5 KB) - added by bricet 10 years ago.
ticket_1196_2.patch (539 bytes) - added by bricet 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by bricet

comment:1 Changed 10 years ago by bricet

This patch may be too intrusive.

Here is a new one. Seems to work fine for me, but as this is quite sensitive, any other point of view would be appreciated ...

Changed 10 years ago by bricet

comment:2 Changed 10 years ago by laurentj

  • Milestone set to Jelix 1.2.2
  • Resolution set to fixed
  • review changed from review? to review+
  • Status changed from new to closed

Thanks for your patch. pushed https://bitbucket.org/jelix/jelix-1.2.x/changeset/9d72c0e12d48

I added some tests.

Note: See TracTickets for help on using tickets.