{"authorId":1,"title":{"title":{}},"slug":"config-variables-plugin","postDate":1297805009,"expiryDate":null,"enabled":1,"fields":{"2":"<p>As I was in the process of moving this site into Git and having a local version, I have been trying to move as many paths as possible into the config.php. One of them included the cache path for <a href=\"http:\/\/devot-ee.com\/add-ons\/image-sizer\/\">image sizer<\/a>. Since the local and production paths are different, I wanted some way for them to be dynamic. In my config.php file, I am using <em>$_SERVER['DOCUMENT_ROOT']<\/em> to set the base_path. I could have enabled PHP in the template and then use the <em>$_SERVER['DOCUMENT_ROOT']<\/em>, but that seemed like a silly reason to enable PHP.<\/p>\n\n<p>So I made a plugin that gives you access to everything in the $config array without having to use PHP.<\/p>\n\n<h2>Usage<\/h2>\n\n<pre><code>&#123;exp:config:vars value=\"base_path\"&#125;<\/code><\/pre>\n\n<p>To see all possible values, just pass in &ldquo;all&rdquo;:<\/p>\n\n<pre><code>&#123;exp:config:vars value=\"all\"&#125;<\/code><\/pre>\n\n<h2>Download<\/h2>\n\n<p>You can download from <a href=\"https:\/\/github.com\/davist11\/Config-Variables-Plugin\">GitHub<\/a> or <a href=\"http:\/\/devot-ee.com\/add-ons\/config-variables\/\">Devot-ee<\/a>. As always, let me know if you run into any issues.<\/p>","4":{"website":{}}}}