lodfredy Posted September 26, 2013 Posted September 26, 2013 Hello to everyone. I need a main page to put some information (this page redirects to catalog page), I thought to make a copy of index.php (index2.php) and modify one of the two pages (in this way, I dont lose any of design), but I need to remove left and right lateral bars only in one of the pages and I dont know how to do it. Another way to do that i need is to remove lateral bars only where the customer is viewing the mani page, if the customer see any other page (like a category or shop cart) this must see like normal oscommerce template (in fact, this is a better way to do it). If you dont understand me, tell me and i will try to explain me again.. Additional info: my url wepshop looks like http://domain.com/catalog/index.php Thanks in advance and sorry for the inconvenience.
♥mommaroodles Posted September 26, 2013 Posted September 26, 2013 Ok, I think I understand what you trying to do and if I do, then this is what you will have to do to get rid of the left and right columns. The three files you'll have to make 2 copies of is the index.php, template_top.php and template_bottom.php First make a copy of the page so you have index.php and index1.php Then make copies of the others so you have template_top.php, template_top1.php, template_bottom.php and template_bottom1.php Then in template_top1.php from the <body> tag - it should look like this <body> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>"> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <div id="bodyContent"> and you template_bottom1.php file should then look like this <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ ?> </div> <!-- bodyContent //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> </div> <!-- bodyWrapper //--> <?php echo $oscTemplate->getBlocks('footer_scripts'); ?> </body> </html> then in your index1.php file where it says require(DIR_WS_INCLUDES . 'template_top.php'); change that to require(DIR_WS_INCLUDES . 'template_top1.php'); and do the same with the require(DIR_WS_INCLUDES . 'template_bottom.php'); to require(DIR_WS_INCLUDES . 'template_bottom1.php'); I think this is what you trying to do - if not let me know - if it is then after you can style and do with the content as you want "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
Guest Posted September 27, 2013 Posted September 27, 2013 Hi, I think this would be the best solution for you -> http://www.oscommerce.com/forums/topic/392595-left-column-hidden-only-at-home-page/#entry1668915 Don`t crate another template, just edit existing once.
lodfredy Posted September 27, 2013 Author Posted September 27, 2013 Ok, I think I understand what you trying to do and if I do, then this is what you will have to do to get rid of the left and right columns. The three files you'll have to make 2 copies of is the index.php, template_top.php and template_bottom.php First make a copy of the page so you have index.php and index1.php Then make copies of the others so you have template_top.php, template_top1.php, template_bottom.php and template_bottom1.php Then in template_top1.php from the <body> tag - it should look like this <body> <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>"> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <div id="bodyContent"> and you template_bottom1.php file should then look like this <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ ?> </div> <!-- bodyContent //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> </div> <!-- bodyWrapper //--> <?php echo $oscTemplate->getBlocks('footer_scripts'); ?> </body> </html> then in your index1.php file where it says require(DIR_WS_INCLUDES . 'template_top.php'); change that to require(DIR_WS_INCLUDES . 'template_top1.php'); and do the same with the require(DIR_WS_INCLUDES . 'template_bottom.php'); to require(DIR_WS_INCLUDES . 'template_bottom1.php'); I think this is what you trying to do - if not let me know - if it is then after you can style and do with the content as you want Yes this is that i want to do, but i have a problem, the main page is working well, but any other pages has problems with the content (i think is a problem of the front page module), I think I need to make more changes to the pages to solve this issue (index1.php,cart_shop, etc). here can you see the difference between pages. http://imageshack.us/a/img191/704/l13a.png http://imageshack.us/a/img15/5406/h6mo.png Hi, I think this would be the best solution for you -> http://www.oscommerce.com/forums/topic/392595-left-column-hidden-only-at-home-page/#entry1668915 Don`t crate another template, just edit existing once. The instruction of the link doesn´t work,i tried it and do not make changes in the page. Thanks guys.
♥joli1811 Posted September 27, 2013 Posted September 27, 2013 why not use http://addons.oscommerce.com/info/7691 To improve is to change; to be perfect is to change often.
lodfredy Posted September 27, 2013 Author Posted September 27, 2013 why not use http://addons.oscommerce.com/info/7691 What exactly is this?} Thanks.
♥mommaroodles Posted September 27, 2013 Posted September 27, 2013 Yes this is that i want to do, but i have a problem, the main page is working well, but any other pages has problems with the content (i think is a problem of the front page module), I think I need to make more changes to the pages to solve this issue (index1.php,cart_shop, etc). here can you see the difference between pages. http://imageshack.us/a/img191/704/l13a.png http://imageshack.us/a/img15/5406/h6mo.png The instruction of the link doesn´t work,i tried it and do not make changes in the page. Thanks guys. I was under the impression that you only wanted the 1 page - the main page - to be without columns and then once you click on that page to the others or just 1 other page which would then in fact operates as normal - but the code I gave you would work and you can still create a cool page - but if you using the modular front page addon to display content on the page without the columns then and that is the result, i would say yes - you'd need to edit those. On the page now without the columns do you still have this in your 'index1.php' file <?php echo $oscTemplate->getBlocks('front_page'); ?> "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
lodfredy Posted September 27, 2013 Author Posted September 27, 2013 I was under the impression that you only wanted the 1 page - the main page - to be without columns and then once you click on that page to the others or just 1 other page which would then in fact operates as normal - but the code I gave you would work and you can still create a cool page - but if you using the modular front page addon to display content on the page without the columns then and that is the result, i would say yes - you'd need to edit those. On the page now without the columns do you still have this in your 'index1.php' file <?php echo $oscTemplate->getBlocks('front_page'); ?> The problem is this <div style="width:100%;background-color:black;">s</div> I need to find and remove it from the code.
lodfredy Posted September 28, 2013 Author Posted September 28, 2013 Problem fixed. Thanks to all guys.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.