Nullified Posted August 15, 2012 Share Posted August 15, 2012 I have checked in {debug} and it seems no such variables exists within homepage.tpl that would allow me to list the support ticket departments on the homepage. Is it possible to get such data inserted? I am simply trying to add links to my support departments on the homepage. 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted August 15, 2012 Share Posted August 15, 2012 You just need to grab the list from the database. You can do that inside the template or by creating a hook. Here is an example of just adding it to the template: {php} $result = mysql_query("SELECT id, name FROM tblticketdepartments WHERE hidden = ""); $departments = array(); while ($data = mysql_fetch_array($result)) { array_push($departments, $data); } $this->_tpl_vars['departments'] = $departments; {/php} 0 Quote Link to comment Share on other sites More sharing options...
Nullified Posted August 16, 2012 Author Share Posted August 16, 2012 that worked with changing the query to: "SELECT id, name FROM tblticketdepartments WHERE hidden = ''" thanks for the response. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.