abdumalik LiteCart Fan Từ Sweden Thành viên kể từ thg 10 2021 abdumalik 12 thg 9 2022 08:19 Hello How can I build new header and footer sections of site and then how to connect the new header, footer sections to page ?
vilaiporn LiteCart Fan Từ Thailand Thành viên kể từ thg 8 2017 vilaiporn 12 thg 9 2022 10:11 For the header edit the file: public_html/includes/templates/default.catalog/layouts/default.inc.php for the footer edit the file: public_html\includes\templates\default.catalog\views\box_site_footer.inc.php I hope it helps. Bye
abdumalik LiteCart Fan Từ Sweden Thành viên kể từ thg 10 2021 abdumalik 12 thg 9 2022 10:24 @vilaiporn I need to create new one header and footer and it should connect one page. Purpose is one page should have special header and footer. When I create new page and I opened it had a header and footer which came from that you showed path but I can’t find link in that page for it.
vilaiporn LiteCart Fan Từ Thailand Thành viên kể từ thg 8 2017 vilaiporn 12 thg 9 2022 10:30 Oh, so you need a footer and header different depending on each page, for example the home page will have a different footer than the category page, right?
abdumalik LiteCart Fan Từ Sweden Thành viên kể từ thg 10 2021 abdumalik 12 thg 9 2022 11:35 Yes, you got it now.
vilaiporn LiteCart Fan Từ Thailand Thành viên kể từ thg 8 2017 vilaiporn 12 thg 9 2022 14:27 In the file public_html\includes\templates\default.catalog\layouts\default.inc.php you will find this string: <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_site_footer.inc.php'); ?> duplicate it and wrap it in 2 div: <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_site_footer.inc.php'); ?> </div> <div class="hide-categories"> <?php include vmod::check(FS_DIR_APP . 'includes/boxes/box_site_footer2.inc.php'); ?> </div>``` In this example we will use the standard footer for all pages, a different footer for the page yourecommerce.com/categories. Up in the file default.inc.php create a <style></style> section and add: ```.hide-categories {display:none} .hide-categories {display:<?php $actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $z = "https://yourecommerce.com/categories"; if ($actual_link == $z) echo "block"; ?>} .hide-index {display:<?php if ($actual_link == $z) echo "none"; ?>}``` Change yourecommerce.com with your actual domain. In this way you will let appear a div that contain a link to a different footer depending on the URL. Then go to the file public_html\includes\boxes\box_site_footer.inc.php duplicate it and rename it box_site_footer2.inc.php; in the end of the file locate: echo $box_site_footer->stitch('views/box_site_footer'); and modify to echo $box_site_footer->stitch('views/box_site_footer2'); then go to public_html\includes\templates\default.catalog\views\box_site_footer.inc.php Duplicate the file box_site_footer.inc.php and rename it to box_site_footer2.inc.php and edit on will. So, when you will reach the categories page it will apply a different footer. Probably does exist an easier way... Let's see if somebody else in the forum will have an idea.
tim Founder Từ Sweden Thành viên kể từ thg 5 2013 tim 12 thg 9 2022 22:24 For a separate layout for the first page. Edit pages/index.inc.php Set the layout to use at the top: <?php document::$layout = 'firstpage'; Then create includes/templates/default.catalog/layouts/firstpage.inc.php and give it any html you would like.