developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 13 years ago
Closed 13 years ago
#349 closed enhancement (fixed)
improve tpl plugin of type : block.if*
Reported by: | bibo | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Jelix 1.0 RC1 |
Component: | jelix:tpl | Version: | trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Documentation needed: | ||
Hosting Provider: | Php version: |
Description
block template plugins of type if* ({ifuserconnected} for example) don't support {else} alternative.
the following patch attached adds this feature in jTplCompiler.class.php without importing the plugins names into it.
Attachments (1)
Change History (4)
comment:1 in reply to: ↑ description Changed 13 years ago by bibo
Changed 13 years ago by bibo
comment:2 Changed 13 years ago by bibo
Ok. I uploaded a new patch. I had missed the alternative syntax used for if/else block.
in the last patch, I update all block.if* tpl plugins. Now they also follow that alternative syntax.
As far as my testing goes, it plays well but has a side effect. If one forgets to close an ifuserconnected tag for example, the compiled php cannot be parsed and throws an error. I would say that this side effect already exists for a simple if tag (with or without the patch) but i may be wrong.
comment:3 Changed 13 years ago by laurentj
- Milestone set to Jelix 1.0 RC1
- Resolution set to fixed
- Status changed from new to closed
Patch landed in the trunk. Thanks for this patch !
Fixed also the bug you found : an error is now generated when a block is not closed.
Oops, i missed a problem with the current patch. Please wait before looking at it...