Parser - Conditions in Loop |
Hi,
Is it possible to use the basic allowed conditions in the parser within loops? If doesn't seem to be working for me. Code: {% if !empty($products) %} Code: {% if !empty($price_sellprice) %} Code: $parser->setConditionalDelimiters('{%', '%}'); Code: {% if !empty($products) %}
The following test passes.
PHP Code: public function testParseLoop(): void (09-04-2023, 08:31 AM)ltarrant Wrote: I may not have explained the issue very well.
To resolve my issues I ended up using Kenjis CI4 Twig Library and using Twig as a Template engine rather than the built in Parser.
https://github.com/kenjis/codeigniter-ss-twig |
Welcome Guest, Not a member yet? Register Sign In |