Tampa Posted April 16, 2020 Share Posted April 16, 2020 I am working on a new template based on v4, but I cannot find a full list of information contained in the $sidebarstats and $stats variable. Is there a document somewhere that lists them or can I fetch them from the system somewhere? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 17, 2020 Share Posted April 17, 2020 11 hours ago, Tampa said: I am working on a new template based on v4, but I cannot find a full list of information contained in the $sidebarstats and $stats variable. Is there a document somewhere that lists them or can I fetch them from the system somewhere? just add {debug} to the sidebar.tpl template, and when you refresh the page, it should open a popup window containing most of the Smarty arrays and variables available to the page - including those you that you mentioned. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 17, 2020 Share Posted April 17, 2020 oh - don't forget to remove {debug} from the template when you no longer need that window! 0 Quote Link to comment Share on other sites More sharing options...
Tampa Posted April 17, 2020 Author Share Posted April 17, 2020 Hm, according to that $stats.pendingcancellations should show the pending cancellation requests, but that returns nothing. Or is that $sidebarstats.services.completed? These variables seem to exist, but they return nothing when implanted into the tpl. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 17, 2020 Share Posted April 17, 2020 {$sidebarstats.services.completed} should certainly return the correct value - and does for me locally. with regards to $stats, isn't that only available on the client summary page? if so, you should be able to use those values in the clientsummary template, but not outside of it. 0 Quote Link to comment Share on other sites More sharing options...
Tampa Posted April 17, 2020 Author Share Posted April 17, 2020 It returns 1 for me, but there are two cancellation requests pending currently, so I guess sidebarstats does not have a variable for those. Can I add that somehow? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 17, 2020 Share Posted April 17, 2020 4 hours ago, Tampa said: Can I add that somehow? if the value you want doesn't exist, then you would need to use ad AdminAreaPage hook to pull the value from the database and pass it back to the template. 0 Quote Link to comment Share on other sites More sharing options...
Tampa Posted April 18, 2020 Author Share Posted April 18, 2020 Is it wise to do that in the templates? I want to avoid increasing page load times. Do you have a snippet for that? 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.