slinky Posted October 13, 2013 Share Posted October 13, 2013 I'm trying to do a simple thing but templating doesn't seem to be working as I'd expect. I'm trying to get the submittickets.php template to appear as the front page for support and place a table of options on top. Unfortunately neither the submittickets.php or nor the knowledgebase.php nor many of the others will display on the homepage.tpl even if you copy the entire template to the homepage.tpl. Can someone explain what I'm missing and why it seems that templates are reliant on PHP? I'm assuming that the PHP code is building the template and that the only way to get what I want to do is to change the name of the php files, e.g. change submittickets.php to index.php or is there a better way? Is there a way to get the knowledgebase on there too or at least some of the most asked questions like I see on another page? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 13, 2013 Share Posted October 13, 2013 If you copy the tpl it can't work because all its variables comes from the related php file. You should try including the php. {include_php file='whatever.php'} 0 Quote Link to comment Share on other sites More sharing options...
slinky Posted October 15, 2013 Author Share Posted October 15, 2013 Much appreciated. Unfortunately I still can't get it to work. I'm trying to combine the function of the knowledgebase and submit tickets on the homepage.tpl. Neither one will load on homepage.tpl, even copying the entire template and include the include to load the variables from the related PHP file. Frustrating! 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 15, 2013 Share Posted October 15, 2013 (edited) Honestly i think that it would be much easier with API function: Open Ticket. With API you don't have to worry about WHMCS-side problems since you can freely create the page you want and simply push the data to WHMCS via API. Edited October 15, 2013 by Kian 0 Quote Link to comment Share on other sites More sharing options...
slinky Posted October 15, 2013 Author Share Posted October 15, 2013 Kian - Thanks - the API looks like PHP based variables and I've been trying to use the templates from a theme I have. Finally I was able to find someone who pushed some items to the front page using a custom MYSQL query which I slightly modified. The knowledgebase I have is just the search bar, which should be sufficient. Thanks again for your attempt to help. 0 Quote Link to comment Share on other sites More sharing options...
slinky Posted October 16, 2013 Author Share Posted October 16, 2013 Frustrating. I can set up all the support tickets but none of them will do anything with the mysql query. {include_php file='submitticket.php'} Unfortunately this results in a blank page. I have always hated smarty... 0 Quote Link to comment Share on other sites More sharing options...
slinky Posted October 16, 2013 Author Share Posted October 16, 2013 submitticket.php is encoded... boy does that get frustrating. So essentially I can't even see what I could I could move from php file to php file. This should be a simple process. I'm just trying to get the support tickets to load and direct to the right place on the home/front page. 0 Quote Link to comment Share on other sites More sharing options...
slinky Posted October 16, 2013 Author Share Posted October 16, 2013 Frustrating. I see the problem. It's now generating an index.php instead of a submitticket.php on the template... frustration... this should be easier! 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.