Print this page

To date I have used Sugar CRM 6.5.16. Then I decided to install the CRM Suite 7.1.2. Customize fields and modules have identical to the previous version, Suite CRM connect to an existing database and all up and running immediately. Except for one thing that is most important to me. When you need to print something, instead we only see the menu on the routes, I can see the menu. And it would not be so dangerous to the menu printed only at the top. Menu on paper appears everywhere. I therefore covers the text to be printed.
I copied the file view.detail.config.php in / custom / modules / / views / i rewrote this: ‘req_params’ => array (
‘print’ => array (
‘param_value’ => true,
‘config’ => array (
‘show_header’ => false,
‘show_footer’ => false,
‘view_print’ => true,
‘show_title’ => false,
‘show_subpanels’ => false,
‘show_javascript’ => true,
‘show_search’ => false,)
but still always print menu. How do I fix this?

1 Like

Hi there,

You can add the following to the style.css file:



@media print{
#header{
display: none;
}

Thanks,

Will.

I tried with your method, but it is not good. Immediately the menu extends across the page and instead of being in the ranks, appears in the column, and the whole site is deformed.
The solution that I found is as follows: Create a new Print button and add the following function:

4 => array (
‘customCode’ => ’ ",)

Could you post your complete solution so that others can benefit from it in the future?

Thx!!! :slight_smile:

1 Like

Of course. Go to cusotm/modules//metadata/ and edit detailviewdefs.php
Red text is Custom Print button:
$module_name = ‘radni_nalog’;
$viewdefs [$module_name] =
array (
‘DetailView’ =>
array (
‘templateMeta’ =>
array (
‘form’ =>
array (
‘buttons’ =>
array (
0 => ‘EDIT’,
1 => ‘DUPLICATE’,
2 => ‘DELETE’,
3 => ‘FIND_DUPLICATES’,
[color=#ff0000]4=> array (
‘customCode’ => ‘’,),[/color]

),
),
This is how add button. If you want to print a page without a menu, you need to be create new folder views u cusotm/modules//
Then copy the file include/MVC/View/views/view.detail.config.php to cusotm/modules// viewes.
And the last thing you need is to be edited to the fal and add the following:
‘req_params’ => array(
[color=#ff0000]‘print’ => array(
‘param_value’ => true,
‘config’ => array(
‘show_header’ => false,
‘show_footer’ => false,
‘view_print’ => true,
‘show_title’ => false,
‘show_subpanels’ => true,
‘show_javascript’ => true,
‘show_search’ => false,)
),[/color]

2 Likes