vmoulin78 / codeigniter-layout-library

CodeIgniter Template Library
MIT License
24 stars 9 forks source link

yaml #1

Closed rakucmr closed 7 years ago

rakucmr commented 7 years ago

You need yaml just for parent_template parameter?

vmoulin78 commented 7 years ago

Today, there is only one parameter but in the future, there will certainly be more than one and I didn't find a configuration type as good as YAML. If you may not install the YAML extension, the alternative is to install a CodeIgniter YAML Library.

rakucmr commented 7 years ago

why are not using config files, that can be processed with config codeigniter library?

vmoulin78 commented 7 years ago

I thought about it and hesitated between the two solutions. I finally chose YAML because I consider:

And the advantage is that I can have the template file (ex: footer_template.php) and the config file (ex: footer_template.yml) with the same name in the same folder.

vmoulin78 commented 7 years ago

Maybe, I could manage both solutions: If there is a config.yml file, I load this file Otherwise, I load the php file config.php which contains the same data but in the php format

vmoulin78 commented 7 years ago

Version 3.1.0: Regarding the configuration file, you can now choose the PHP or YAML format.

rakucmr commented 7 years ago

👍 nice, thanks