For those of you who have been implementing the customization I made and wrote in in the article How to Show Breadcrumb Links in Websites that Generated with PHPMaker 9.0.1, then this following customization below is recommended for you. You will find that in the previous article above, we are showing the Breadcrumb Links twice in the list page that displaying master page; one for its master record, and the other for detail record. By implementing the customization below, then we remove the Breadcrumb Links for detail record, and leave the Breadcrumb Links for its master record, but the information in that section will display the Breadcrumb Links for detail record. In addition this will leave only one breadcrumb links above the page title of master detail section, this customization also will leave only one help icon in the same location.
Warning: Please note that before implementing the customization below, make sure you have implemented the related customization as following:
- How to Customize Page Title Style in Websites that Created With PHPMaker 9.0.1
- How to Add Help Feature into Websites that Generated by PHPMaker 9.0.2
- How to Show Breadcrumb Links in Websites that Generated with PHPMaker 9.0.1
Updated on February 10, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.
Updated on June 17, 2013: This customization below has been handled by using MasinoFixedWidthSite extension. You don’t need to implement the customization below if you use my extensions together with the original PHPMaker Template and Extension files.
[hidepost]
-
Open your \Script\list-script.php file, and find this code:
<?php // Begin of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php if (MS_SHOW_BREADCRUMB_IN_ALL_PAGES) { ?> <span> <div id="ewContainer"> <ul id="breadcrumb"> <?php if (isset($_GET["showmaster"])) { $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".$_GET["showmaster"]."') ORDER BY C.Lft"; // showmaster, in order to get the full path of the master record!, modified by Masino Sinaga, January 27, 2012 } else { $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".ew_CurrentPage()."') ORDER BY C.Lft"; } $rs = $conn->Execute($sSql); $recCount = $rs->RecordCount(); $rs->MoveFirst(); $i = 1; while (!$rs->EOF) { if ($i < $recCount) { if ($i==1) { echo "<li><a href='". $rs->fields("Page_URL")."' title='".$Language->BreadcrumbPhrase("Home")."'><img src='./phpimages/home.png' alt='".$Language->BreadcrumbPhrase("Home")."' class='home' /></a></li>"; } else { echo "<li><a href='". $rs->fields("Page_URL")."'>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</a></li>"; } } else { echo "<li>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</li>"; } $i++; $rs->MoveNext(); } $rs->Close(); ?> </ul> </div> </span> <?php } ?> <?php // End of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?>then replace it with the following code:
<?php // Begin of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php if (MS_SHOW_BREADCRUMB_IN_ALL_PAGES) { ?> <span> <div id="breadcrumbcontainer"> <ul id="breadcrumb"> <?php //if (isset($_GET["showmaster"])) { // $sSql = "SELECT C.* // FROM breadcrumblinks AS B, breadcrumblinks AS C // WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) // AND (B.Page_URL LIKE '".$_GET["showmaster"]."') // ORDER BY C.Lft"; // showmaster, in order to get the full path of the master record!, modified by Masino Sinaga, January 27, 2012 //} else { $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".ew_CurrentPage()."') ORDER BY C.Lft"; //} $rs = $conn->Execute($sSql); $recCount = $rs->RecordCount(); $rs->MoveFirst(); $i = 1; while (!$rs->EOF) { if ($i < $recCount) { if ($i==1) { echo "<li><a href='". $rs->fields("Page_URL")."' title='".$Language->BreadcrumbPhrase("Home")."'><img src='./phpimages/home.png' alt='".$Language->BreadcrumbPhrase("Home")."' class='home' /></a></li>"; } else { echo "<li><a href='". $rs->fields("Page_URL")."'>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</a></li>"; } } else { echo "<li>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</li>"; } $i++; $rs->MoveNext(); } $rs->Close(); ?> </ul> </div> </span> <?php } ?> <?php // End of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> -
Still in that \Script\list-script.php file, find again this code:
<!--## if (bGridAdd) { ##--> } <!--## } ##--> ?> <?php // Begin of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php if (MS_SHOW_BREADCRUMB_IN_ALL_PAGES) { ?> <span> <div id="ewContainer"> <ul id="breadcrumb"> <?php $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".ew_CurrentPage()."') ORDER BY C.Lft"; $rs = $conn->Execute($sSql); $recCount = $rs->RecordCount(); $rs->MoveFirst(); $i = 1; while (!$rs->EOF) { if ($i < $recCount) { if ($i==1) { echo "<li><a href='". $rs->fields("Page_URL")."' title='".$Language->BreadcrumbPhrase("Home")."'><img src='./phpimages/home.png' alt='".$Language->BreadcrumbPhrase("Home")."' class='home' /></a></li>"; } else { echo "<li><a href='". $rs->fields("Page_URL")."'>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</a></li>"; } } else { echo "<li>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</li>"; } $i++; $rs->MoveNext(); } $rs->Close(); ?> </ul> </div> </span> <?php } ?> <?php // End of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php // Begin of modification Optimizing Main Table Width to Maximum Width of Site, by Masino Sinaga, April 30, 2012 ?> <table id="ewContainer" cellspacing="0" cellpadding="0" border="0" <?php if (MS_TABLE_WIDTH_STYLE==1) { echo "width=".MS_SCROLL_TABLE_WIDTH."px"; } elseif (MS_TABLE_WIDTH_STYLE==3) {echo "width=100%"; } ?>> <?php // End of modification Optimizing Main Table Width to Maximum Width of Site, by Masino Sinaga, April 30, 2012 ?> <!--## if (CTRL.CtrlID == "grid") { ##--> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, May 1, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php if ($<!--##=gsTblVar##-->->CurrentMode == "add" || $<!--##=gsTblVar##-->->CurrentMode == "copy") { ?><!--##@Add##--><?php } elseif ($<!--##=gsTblVar##-->->CurrentMode == "edit") { ?><!--##@Edit##--><?php } ?> <?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?></span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, May 1, 2012 ?> <!--## } else if (CTRL.CtrlID == "list") { ##--> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, May 1, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?> <!--## if (nMasterTableCount > 0) { ##--> <?php if ($<!--##=gsTblVar##-->->getCurrentMasterTable() == "") { ?> <?php // Begin of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <a href="javascript:popupWindow('help.php?page=<?php echo ew_CurrentPage(); ?>')"><img src="phpimages/question.ico" title="<?php echo ew_HtmlEncode($Language->Phrase("help")) ?>" width="16" height="16" border="0"></a> <?php // End of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <?php $<!--##=sPageObj##-->->ExportOptions->Render("body"); ?> <?php } ?> <!--## } else { ##--> <?php // Begin of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <a href="javascript:popupWindow('help.php?page=<?php echo ew_CurrentPage(); ?>')"><img src="phpimages/question.ico" title="<?php echo ew_HtmlEncode($Language->Phrase("help")) ?>" width="16" height="16" border="0"></a> <?php // End of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <?php $<!--##=sPageObj##-->->ExportOptions->Render("body"); ?> <!--## } ##--> <!--## } ##--> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, May 1, 2012 ?> <?php // Begin of modification Optimizing Main Table Width to Maximum Width of Site, by Masino Sinaga, April 30, 2012 ?> </table> <?php // End of modification Optimizing Main Table Width to Maximum Width of Site, by Masino Sinaga, April 30, 2012 ?> <!--##/session##--> <!--##session htmmain##-->then replace it with the following code:
<!--## if (bGridAdd) { ##--> } <!--## } ##--> ?> <!--## if (nMasterTableCount <= 0) { ##--> <!--## } ##--> <!--## if (CTRL.CtrlID == "grid") { ##--> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php if ($<!--##=gsTblVar##-->->CurrentMode == "add" || $<!--##=gsTblVar##-->->CurrentMode == "copy") { ?><!--##@Add##--><?php } elseif ($<!--##=gsTblVar##-->->CurrentMode == "edit") { ?><!--##@Edit##--><?php } ?> <?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?> <?php // Begin of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <a href="javascript:popupWindow('help.php?page=<?php echo ew_CurrentPage(); ?>')"><img src="phpimages/question.ico" title="<?php echo ew_HtmlEncode($Language->Phrase("help")) ?>" width="16" height="16" border="0"></a> <?php // End of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <!--## } else if (CTRL.CtrlID == "list") { ##--> <!--## if (nMasterTableCount > 0) { ##--> <?php if ($<!--##=gsTblVar##-->->getCurrentMasterTable() == "") { ?> <?php // Begin of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php if (MS_SHOW_BREADCRUMB_IN_ALL_PAGES) { ?> <span> <div id="breadcrumbcontainer"> <ul id="breadcrumb"> <?php $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".ew_CurrentPage()."') ORDER BY C.Lft"; $rs = $conn->Execute($sSql); $recCount = $rs->RecordCount(); $rs->MoveFirst(); $i = 1; while (!$rs->EOF) { if ($i < $recCount) { if ($i==1) { echo "<li><a href='". $rs->fields("Page_URL")."' title='".$Language->BreadcrumbPhrase("Home")."'><img src='./phpimages/home.png' alt='".$Language->BreadcrumbPhrase("Home")."' class='home' /></a></li>"; } else { echo "<li><a href='". $rs->fields("Page_URL")."'>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</a></li>"; } } else { echo "<li>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</li>"; } $i++; $rs->MoveNext(); } $rs->Close(); ?> </ul> </div> </span> <?php } ?> <?php // End of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?> <?php // Begin of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <a href="javascript:popupWindow('help.php?page=<?php echo ew_CurrentPage(); ?>')"><img src="phpimages/question.ico" title="<?php echo ew_HtmlEncode($Language->Phrase("help")) ?>" width="16" height="16" border="0"></a> <?php // End of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <?php $<!--##=sPageObj##-->->ExportOptions->Render("body"); ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <?php } else { ?> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php echo $Language->Phrase("RptDtlRec"); ?>: <?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?> <?php // $<!--##=sPageObj##-->->ExportOptions->Render("body"); // <-- we don't need export icons here; it has been handled in the master section above! ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <?php } ?> <!--## } else { ##--> <?php // Begin of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php if (MS_SHOW_BREADCRUMB_IN_ALL_PAGES) { ?> <span> <div id="breadcrumbcontainer"> <ul id="breadcrumb"> <?php $sSql = "SELECT C.* FROM breadcrumblinks AS B, breadcrumblinks AS C WHERE (B.Lft BETWEEN C.Lft AND C.Rgt) AND (B.Page_URL LIKE '".ew_CurrentPage()."') ORDER BY C.Lft"; $rs = $conn->Execute($sSql); $recCount = $rs->RecordCount(); $rs->MoveFirst(); $i = 1; while (!$rs->EOF) { if ($i < $recCount) { if ($i==1) { echo "<li><a href='". $rs->fields("Page_URL")."' title='".$Language->BreadcrumbPhrase("Home")."'><img src='./phpimages/home.png' alt='".$Language->BreadcrumbPhrase("Home")."' class='home' /></a></li>"; } else { echo "<li><a href='". $rs->fields("Page_URL")."'>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</a></li>"; } } else { echo "<li>".$Language->BreadcrumbPhrase($rs->fields("Page_Title"))."</li>"; } $i++; $rs->MoveNext(); } $rs->Close(); ?> </ul> </div> </span> <?php } ?> <?php // End of modification Displaying Breadcrumb Links in All Pages, by Masino Sinaga, May 4, 2012 ?> <?php // Begin of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <div id="ewContainer"> <span class="phpmaker ewTitle" style="white-space: nowrap;"><?php echo $Language->Phrase("<!--##="TblType" + TABLE.TblType##-->") ?><?php echo $<!--##=gsTblVar##-->->TableCaption() ?> <?php // Begin of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <a href="javascript:popupWindow('help.php?page=<?php echo ew_CurrentPage(); ?>')"><img src="phpimages/question.ico" title="<?php echo ew_HtmlEncode($Language->Phrase("help")) ?>" width="16" height="16" border="0"></a> <?php // End of modification Add Help Feature, by Masino Sinaga, June 6, 2012 ?> <?php $<!--##=sPageObj##-->->ExportOptions->Render("body"); ?> </span> </div> <?php // End of modification Customize Page Title Style, by Masino Sinaga, September 4, 2012 ?> <!--## } ##--> <!--## } ##--> <!--##/session##--> <!--##session htmmain##--> - Finally, re-generate your script files using PHPMaker as always.
[/hidepost]
[…] PHP Report Maker Home » Customize Template » Improving Help Feature in Websites that Generated by PHPMaker 9.1.0 Improving Breadcrumb Links Feature in Websites that Generated by PHPMaker 9.1.0 […]