ffeingol Posted August 18, 2016 Share Posted August 18, 2016 From what I've been able to figure out so far (reading the forum and digging into template code etc.) I take it that there is no way to customize the home page panels. I'd like (for example) to show recent support tickets differently. I assume I'd have to use a hook to remove the panel and the code a hook to recreate it. I know how to remove the panel (as I've removed several already that we don't use). I'm also pretty sure I can write the HTML to grab what I want. My issues that that I'd like to show a small table (ticket number, ticket subject, status, last activity date). I'm not really sure how template that, since the panels all seem to be in a generic formatting loop in the template. Thanks in advance for any advice. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 18, 2016 Share Posted August 18, 2016 From what I've been able to figure out so far (reading the forum and digging into template code etc.) I take it that there is no way to customize the home page panels. I'd like (for example) to show recent support tickets differently. I assume I'd have to use a hook to remove the panel and the code a hook to recreate it. you could take it's existing content, modify it and then send it's output back to the panel (i've posted hook code in the thread below that does that previously) - but for all but the most simple panels, it would be easier as you say to delete the existing panel and recreate it... also, if you modify an existing panel, you're not necessarily fully in control of when it's displayed... if you create it, you are. http://forum.whmcs.com/showthread.php?111614-how-can-i-hide-some-fields&p=457799#post457799 the above code doesn't delete and recreate the sidebar, it takes an existing sidebar and modifies its content - in terms of using hooks, the process is very similar whether you're working with a navbar, sidebar or panel. I know how to remove the panel (as I've removed several already that we don't use). I'm also pretty sure I can write the HTML to grab what I want. My issues that that I'd like to show a small table (ticket number, ticket subject, status, last activity date). I'm not really sure how template that, since the panels all seem to be in a generic formatting loop in the template. well, you'll still be looping... but just inside a table ! if you're looking to use a homepagepanel hook, then you'll generally need to do three things... 1. query the database and/or class to get the variables you need. 2. modify the results to your own specific needs. 3. output results to the panel. for example, with regards to the existing support tickets panel, the array (when it exists) is also available in Smarty... so you have the option of adding a panel (or doing something outside of a panel), purely in Smarty/HTML in the clientareahome.tpl template instead of using an action hook - which method to use is down to your experience and knowledge - and also what you want to do with its output and if that's easier to do via PHP or Smarty. 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.