Now it's time to customize Page Title style in websites that generated by PHP Report Maker. Just like the similar customization that we had implemented for PHP Maker, we will also customizing the template file for this purpose, so we can use it for other future PHP Report Maker projects.
After implementing this customization, your Page Title style will become more eye-catching, since it has the outline style around the title and the Export to media icons.
[hidepost]
-
First of all, we will add our new style to the .css file that will be generated by PHP Report Maker. To do this, from your PHP Report Maker application, go to HTML tab, then click on Styles sub-tab, and then click on Edit Styles button. You will see a CSS Editor window afterwards. Scroll down to the bottom of that textbox, and find for this code:
/*END_USER_STYLES*/
before that line, please insert the following code:
/* Begin of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 */ .ewTitle{ background-color: #EEEEEE; color: #000000; padding: 0.5em; border-left: 1px solid #CACACA; border-right: 1px solid #CACACA; border-top: 1px solid #CACACA; border-bottom: 1px solid #CACACA; text-align: left; font-family: verdana; /* font name */ font-size: 9pt; /* font size */ font-weight: bold; display: block; vertical-align:top; } /* End of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 */ -
Open your \Script\rpt-template.php file, and find this code:
<p class="ewSpacer"><span class="ewSiteTitle"><?php echo $ReportLanguage->ProjectPhrase("BodyTitle") ?></span></p>then just remove that code from that file. Don’t worry, we will put it in the header in the separate article later. We just don’t want to see the Site Title since it uses the default style which same that the Page Title uses. If we don’t remove it, users will get confused to see two Title in the same page area.
-
Open your \Script\rpt-summary.php file, and find this code:
<p class="ewSpacer"><span id="ewPageCaption" class="ewTitle ewTableTitle"><?php echo $<!--##=gsPageObj##-->->TableCaption() ?> </span><?php $<!--##=gsPageObj##-->->ExportOptions->Render("body") ?></p>then replace it with the following code:
<?php // Begin of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 ?> <div id="ewContainer"> <span id="ewPageCaption" class="phpmaker ewTitle"><?php echo $<!--##=gsPageObj##-->->TableCaption() ?> <?php $<!--##=gsPageObj##-->->ExportOptions->Render("body") ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 ?> -
Open your \Script\rpt-crosstab.php file, and find this code:
<p class="ewSpacer"><span id="ewPageCaption" class="ewTitle ewTableTitle"><?php echo $<!--##=gsPageObj##-->->TableCaption() ?> </span><?php $<!--##=gsPageObj##-->->ExportOptions->Render("body") ?></p>then replace it with the following code:
<?php // Begin of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 ?> <div id="ewContainer"> <span id="ewPageCaption" class="phpmaker ewTitle"><?php echo $<!--##=gsPageObj##-->->TableCaption() ?> <?php $<!--##=gsPageObj##-->->ExportOptions->Render("body") ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, December 3, 2012 ?> - Finally, re-generate your script files using PHP Report Maker as always.
[/hidepost]
[…] note that in some part of the customization below is related to the customization in article Customizing Page Title Style in Websites that Generated by PHP Report Maker 6.0.0. So, please implement the customization in that article above before doing the customization […]