Parser Plugin Question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Parser Plugin Question (/showthread.php?tid=74806) |
Parser Plugin Question - AndreiCurelaru - 11-08-2019 Hi, The possibility to extend the parser with plugins is just awesome and one of my favorite feature. So far for me, {+ singleTag +} and {+ pairTag +}Some tuff inside{+ /pairTag +} works nicely, but yet I have a problem as every versions seems to return nothing else but strings. I would like to make a {+ pairTags +} behave like a <foreach> in order to keep the html inside the view instead of rendering it all inside the plugin's function. I know I can put the logic in the controller and have {entries}{title}{/entries} but that kind of plugin would work inside any parsed view, whatever the controller. Something like: {+ entries channel=blog limit=10 +} <h2>{+ title +}</h2> {+ body +} {+ /entries +} that would be like a Christmas gift ^^ how could i send variables inside a {+ pairTag +} instead of just a string? RE: Parser Plugin Question - AndreiCurelaru - 11-18-2019 Really? :/ Nobody have an idea on how to do that? |