beginner question: fuel_var on homepage
Hello,
I created a site variable in the admin area for my twitter handle which is called "twitter". I'm trying to call it on my homepage in the footer block using <?=fuel_var('twitter')?> but nothing happens. Am I missing something?
Comments
--
<?php
class Home extends CI_Controller{
function __construct(){
parent::__construct();
}
function Home()
{
parent::Controller();
}
public function index()
{
$vars = array('' => '');
$this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'home'));
$this->fuel_page->add_variables($vars);
$this->fuel_page->render();
}
}
?>
<?=$twitter?>
In my Site Variables, I have the variable called 'twitter' which is active and no scope.
BUT when I add "$vars['twitter'] = '@me';" to _variables/global.php, it works.
Could it not be looking at the DB for this information? Is there a setting where I can change where Fuel looks?
Love the CMS, thanks for all your help!
What I want to do is quite simple. I have a Site Variable with a name of "Annual Gift Certificate Price" stored in Fuel with a value of 60. Plain and simple, it just stores a number.
In my view file I have this:
<?=fuel_var('Annual Gift Certificate Price')?>
I'm using the controller method to render the view file, so this is not a fuel page I am trying to load. Also, if it helps, I am doing all of this from a custom module I created called "store".
Thanks,
Erik
<?=$annual_gift_certificate_price?>