jdsnty Posted November 6, 2021 Share Posted November 6, 2021 Hello everyone! I am trying to customize some Admin Area views to show some additional data. In particular, I want to customize the Edit Invoice view (admin/invoices.php?action=edit) and the Clients Invoices view (admin/clientsinvoices.php). This was easy for certain views, like the Clients Summary, where I just had to edit the `clientssummary.tpl` Smarty template file at `admin/templates/blend/`, but the templates directory seems to only cover a handful views: there is no template file for the `invoices` view nor for the `clientsinvoices` view (despite the fact those views are clearly rendered with Smarty). I couldn't find a matching template in other directories either. Is there a way to customize the 'template' used for those views? Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 10, 2021 Share Posted November 10, 2021 If it isn't in a template already, then it has to be done via a admin area output hook and moved around with javascript. 0 Quote Link to comment Share on other sites More sharing options...
jdsnty Posted November 11, 2021 Author Share Posted November 11, 2021 14 hours ago, steven99 said: If it isn't in a template already, then it has to be done via a admin area output hook and moved around with javascript. I ended up doing something similar, except I conditionally included the content (along with JS to move it to the desired place) inside the footer template instead of using an output hook. I reckon Steven's solution is more elegant, though (especially considering I still needed an AdminAreaPage hook in order to pass some additional variables to Smarty). For anyone facing a similar issue, bear in mind that you can get the name of the current view as the `$filename` variable in Smarty (for instance, you can check whether `$filename == 'clientsinvoices'` in order to display a block or run some JavaScript only when accessing the 'Clients Invoices' tab). 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.