Menu

Changing the format of Printer Friendly version

Rie Ann
2024-01-23
2024-02-13
  • Rie Ann

    Rie Ann - 2024-01-23

    Hi,

    On our previous setup of itop version 2.7, we were able to change the format of the printer friendly version of a Problem Management ticket using a custom extension. Please see attached image for the sample friendly version. However, when we have upgraded to version 3.0.2, the printer friendly version is not being formatted at all.

    We have a file 'resources-modifier.modulename.php' which contains the following:

    <?php
    
    class PageUIExtension implements iPageUIExtension
    {
    
        public function GetNorthPaneHtml(iTopWebPage $oPage)
        {
            $oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot() . 'modulename/js/custom.js');
        }
    
        public function GetSouthPaneHtml(iTopWebPage $oPage)
        {
    
        }
    
        public function GetBannerHtml(iTopWebPage $oPage)
        {
            // Nothing to do
        }
    }
    
    ?>
    

    This php file is also part of the dependency in the module.modulename.php. I have also attached the custom.js file that we are using to format the output of the printer friendly version.

    Is there any big changes from version 2.7 to version 3.0.2 of iTop that may have caused the issue? Thank you in advance.

     
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-13

    Hello,
    The page markup was modified a lot in iTop 3.0.0. I guess your custom script is using the page DOM structure, so it should be rewritten ?
    Also, you might switch to css instead of a js file ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.