staniwan Posted October 31, 2009 Posted October 31, 2009 Can some one teach me how to remove the left / right coloum only at the main page / index , at index.php , if i remove the <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> it's effect all the category page , n product listing page. Thank you Sundi Taniwan
♥Biancoblu Posted October 31, 2009 Posted October 31, 2009 Here you will find the documentation on how to remove a column. ~ Don't mistake my kindness for weakness ~
MrPhil Posted October 31, 2009 Posted October 31, 2009 If you want to remove the left and right columns only on the top page (is that a good idea?), I think you need to test if index.php is being called as the top page or as something lower level (category or product display). I suspect that $category_depth would be the key. Try changing <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> and <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> to <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <?php } ?> and <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?> and see if it behaves like you want. If not, I have no idea.
staniwan Posted November 1, 2009 Author Posted November 1, 2009 @Biancoblu the contribution will remove all the left n right column in all index , category , subcategory . Thank you If you want to remove the left and right columns only on the top page (is that a good idea?), I think you need to test if index.php is being called as the top page or as something lower level (category or product display). I suspect that $category_depth would be the key. Try changing <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> and <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> to <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <?php } ?> and <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?> and see if it behaves like you want. If not, I have no idea. Problem Solved this is great... this what i want. thx alot [MrPhil]
♥Biancoblu Posted November 1, 2009 Posted November 1, 2009 @Biancobluthe contribution will remove all the left n right column in all index , category , subcategory . Thank you you're right, I misread your first post, my apologies. ~ Don't mistake my kindness for weakness ~
MrPhil Posted November 1, 2009 Posted November 1, 2009 Problem Solved this is great... this what i want. thx alot [MrPhil] Great!
Whiskers Posted February 4, 2010 Posted February 4, 2010 If you want to remove the left and right columns only on the top page (is that a good idea?), I think you need to test if index.php is being called as the top page or as something lower level (category or product display). I suspect that $category_depth would be the key. Try changing <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> and <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> to <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <?php } ?> and <?php if ($category_depth != 'top') { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?> and see if it behaves like you want. If not, I have no idea. Great little bit of coding. Makes the world of difference. I have tried to do it on the login page, but can't seem to get it working. Is there some difference?
multimixer Posted February 4, 2010 Posted February 4, 2010 Great little bit of coding. Makes the world of difference. I have tried to do it on the login page, but can't seem to get it working. Is there some difference? The login page is just one and there are no categories etc, so the "if" makes no sense there. To make the column disappear there you just change this <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> to this <?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?> My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Whiskers Posted February 4, 2010 Posted February 4, 2010 The login page is just one and there are no categories etc, so the "if" makes no sense there. To make the column disappear there you just change this <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> to this <?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?> Done that, but I have a white section there now. I have used the help here to get rid of the entire column at index etc before: http://www.oscommerce.com/forums/topic/347972-wta-remove-left-n-right-coloum-only-at-index-main-page/page__p__1453333__hl__remove%20right%20column__fromsearch__1entry1453333
multimixer Posted February 4, 2010 Posted February 4, 2010 Done that, but I have a white section there now. I have used the help here to get rid of the entire column at index etc before: http://www.oscommerce.com/forums/topic/347972-wta-remove-left-n-right-coloum-only-at-index-main-page/page__p__1453333__hl__remove%20right%20column__fromsearch__1entry1453333 Well, I don't know what you want to have. You need to change the html of the page to change the look, ie to remove also the <td><table> ...... </table></td> of the left column or to replace it with something else, depends on what you want My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Whiskers Posted February 4, 2010 Posted February 4, 2010 Well, I don't know what you want to have. You need to change the html of the page to change the look, ie to remove also the <td><table> ...... </table></td> of the left column or to replace it with something else, depends on what you want I worked it out. I had to remove this: <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php //require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> Thanks for pointing me in the right direction.
multimixer Posted February 4, 2010 Posted February 4, 2010 I worked it out. I had to remove this: <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php //require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> Thanks for pointing me in the right direction. You removed too much. You removed also the closing </tr> and</table> that are opening at the beginning of the file. In general everything that opens (<tr>) need to close (</tr>) and everything that close needs to open earlier. Thats basic. You can not remove just an opening or just a closing tag My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Whiskers Posted February 4, 2010 Posted February 4, 2010 You removed too much. You removed also the closing </tr> and</table> that are opening at the beginning of the file. In general everything that opens (<tr>) need to close (</tr>) and everything that close needs to open earlier. Thats basic. You can not remove just an opening or just a closing tag Is that going to cause me an issue? It did exactly what I wanted it to do?!
multimixer Posted February 4, 2010 Posted February 4, 2010 Is that going to cause me an issue? It did exactly what I wanted it to do?! Just back put the last </tr> </table> You can read more about here http://www.w3schools.com/html/default.asp Thats basic html. Nothing to do with osCommerce particularly. My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Whiskers Posted March 18, 2010 Posted March 18, 2010 Any ideas how to take the right column out of the sub-category sections? I've done it before, but can't work out how now! :(
Whiskers Posted March 19, 2010 Posted March 19, 2010 Any ideas how to take the right column out of the sub-category sections? I've done it before, but can't work out how now! :( I'm sure that before when I've done it that section got removed when I took it from the index.php, but not this time. There isn't a categories.php in the catalog though?
Whiskers Posted March 21, 2010 Posted March 21, 2010 Can anybody shed some light on the above post please?
John202 Posted March 21, 2010 Posted March 21, 2010 Can anybody shed some light on the above post please? I was going to suggest a solution, but looking back phil has done that already, have you applied that? is that not working?
Whiskers Posted March 21, 2010 Posted March 21, 2010 I was going to suggest a solution, but looking back phil has done that already, have you applied that? is that not working? That's the thing. I have doen that and it worked on the first index page, but not on the sub-categories. It worked before like that, so I can't think of another work-around for it.
Whiskers Posted March 21, 2010 Posted March 21, 2010 That's the thing. I have doen that and it worked on the first index page, but not on the sub-categories. It worked before like that, so I can't think of another work-around for it. Right, I just tried taking that whole chunk of code out and it works. I left this in there still: </tr> </table>
John202 Posted March 21, 2010 Posted March 21, 2010 Right, I just tried taking that whole chunk of code out and it works. I left this in there still: </tr> </table> yes, George is right, you must keep a valid structure, are you not familiar with how html tables must be created or modified? Is everything working OK now? B)
Whiskers Posted March 22, 2010 Posted March 22, 2010 yes, George is right, you must keep a valid structure, are you not familiar with how html tables must be created or modified? Is everything working OK now? B) Not familiar at all really. I am starting a course soon though seeing as I am using it quite a lot now. :) All sorted though yes, thanks.
silviaindian Posted August 31, 2010 Posted August 31, 2010 Hi, everyone. I need to remove the column left in index.php too but only in the product_listing. I´d tried to change MrPhil´s solution but it didn´t work. Could anyone help me with my problem? I don´t know what coult I do more, I can´t find the solution in the forum and I´m not a good programer... Thank you very much! Silvia.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.