The jaccms blog


Tweak Twig Core Template Theme
When use a meta template
phile does not check if the template actually exists. So it will throw an exception if it does not exist. I would rather it simply uses the default template if the meta template is not found.
I tweaked the Lib\Phile\Template\Twig.php
I think I can actually make this a plugin instead of modify core, but seems like core behavior to me.

Tweak Twig Core Template
Noticed that some settings that were made in plugins were not making it into template. I tweaked the Lib\Phile\Template\Twig.php

Adding A debug Print
Wanted a easy standard function that I could enhance later and use throughout all parts of phile.
Decided to add this function to Lib\Phile\Utility.php

The Request URI Problem
UPDATE: The phile core no longer has this problem! Core now handles the querystring and uri properly and strips the query string from the uri. NO CHANGES NEEDED. IGNORE THIS POST!!
If your url has any request ($_GET) variables, the URI does not seem to be parsed correctly and you get a 404.
I modified the core to strip the querystring from the uri.
File: Lib\Phile\Core.php

Switching Themes
Temporary Theme Switch
AS I test different themes, wanted a quick and dirty way to switch between themes. No plugins, just some code in the config.php file and added some links in the bottom zone of my templates.
Config.php
~~~~ // Temporary theme switcher for testing //session_start(); //need for theme switcher \Phile\Session::start(); if(isset($_GET['sitetheme']))…