Using a custom header.tpl for Edit & Detailview

I want to use custom header.tpl for Edit & Detail View for a module

I can set a custom EditView.tpl & DetailView.tpl using view.edit & view.detail in the function preDisplay but can’t see how to change to a custom header.tpl

Is this possible and if so how can I achieve it?

Any help will be gratefully received

Now fixed :slight_smile:

Added a line to detailviewdefs.php

<?php $viewdefs ['Accounts'] = array ( 'DetailView' => array ( 'templateMeta' => array ( 'form' => array ( 'headerTpl' => 'custom/include/DetailView/header.tpl',

Thanks for sharing your solution Mike!

@MikeSolomon might you have a modified version of this to add to or use custom code that would go into the HEAD/META section of a module?

What are you trying to achieve?

I need to include JavaScript (JS) between the tags for a custom module I created, but only for a specific module. For this specific module, the JS is used on a table to sort the columns when the column headers are clicked.

I found another routing for header.tpl that had to be modified in
DetailViewHeader.tpl (Leads/tpls/) line 84 calls include/DetailView/header.tpl
SuiteCRM 7.7.4