osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

New Static Page without columns

This is a discussion on New Static Page without columns within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; hi - looking for some help / ideas... I need add a new page to my site that shows the ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-11-2007, 02:33 AM
mc8 mc8 is offline
New Member
 
Join Date: Mar 2007
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
mc8 is on a distinguished road
Default New Static Page without columns

hi - looking for some help / ideas...

I need add a new page to my site that shows the header and footer, but does not show the left and right columns. I want the page to be editable with the wysiwyg editor from the admin panel. I have been able to add a new static page and edit it with the wysiwyg editor, but I don't see how I can remove the left and right columns only for that page. Any ideas?
thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 08-11-2007, 09:11 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 444
Thanks: 3
Thanked 75 Times in 70 Posts
Rep Power: 6
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: New Static Page without columns

1) create a program to load the page (aaaa.php) which is what is called. [like articles.php]
1a) in aaaa.php make sure you have something that says $sideout = 1;
2) pass the page content id [aaaa.php?content=static.html]
3) go into the templates and change the main_page.tpl.php so that the calls to the left and right side have if statements around them that say
if (!$sideout) {
// here make the call to the sideboxes
}

And there you have ONE way of doing it.

The key is the logic added to the template code to turn the sides on and off and then SOME way to set the flag. That info could be passed in on the get, set in a cookie, etc.
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-11-2007, 09:26 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: New Static Page without columns

Another way using BTS is to just make a new main template and call it something else, line main_no_column.tpl.php and remove the left and right columns from it. Then create your new page and instead of it using main_page.tpl.php as its base, have it use main_no_column.tpl.php instead. That is the easiest way to do it that I can think of.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-11-2007, 09:57 AM
mc8 mc8 is offline
New Member
 
Join Date: Mar 2007
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
mc8 is on a distinguished road
Default Re: New Static Page without columns

Thanks Michael - I understand that now, the part I still don't get (a little thick today) is how / where i "have it use main_no_column.tpl.php instead" .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-11-2007, 11:04 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: New Static Page without columns

If you look in a page base file (a file in the catalog directory like shipping.php), you will see that they call main_page.tpl.php. You would just change that call to your new main template.

Look for:
PHP Code:
include (bts_select('main'$content_template)); // BTSv1.5 
In your template and change it to your new template name like this:

PHP Code:
include (DIR_WS_TEMPLATES 'main_no_col.tpl.php'); 
Done.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to michael_s For This Useful Post:
mc8 (08-11-2007)
  #6  
Old 08-11-2007, 11:42 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 444
Thanks: 3
Thanked 75 Times in 70 Posts
Rep Power: 6
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: New Static Page without columns

I hate to be repetitive, but that is going to be a maintenance nightmare...

here is a small portion of a diff between the original and a modified main_page.tpl.php

diff templates/a/main_page.tpl.php templates/a/main_page.tpl.php-orig.txt

Code:
13,15d12
< <link rel="stylesheet" href="/includes/windowfiles/dhtmlwindow.css" type="text/css">
< <script type="text/javascript" src="/includes/windowfiles/dhtmlwindow.js">
< </script>
30,31c27
< <link rel="stylesheet" type="text/css" href="<?php echo DIR_WS_TEMPLATES; ?>coolmenu.css">
< <link rel="stylesheet" type="text/css" href="<?php echo DIR_WS_TEMPLATES; ?>gtabs.css">
---
> <link rel="stylesheet" type="text/css" href="<?php echo DIR_WS_TEMPLATES; ?>/coolmenu.css">
37,38d32
< 
< 
111d104
< 
129c122
<     <table width="100%" height=52 cellpadding="0" cellspacing="0" border="0" align="center">
---
>     <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
135c128
<         <table border="0" width="100%"  cellpadding="0" cellspacing="0" style="border-collapse: collapse;border-color:#cccccc">
---
>         <table border="1" width="100%"  cellpadding="0" cellspacing="0" style="border-collapse: collapse;border-color:#cccccc">
138,144d130
< <? // added BIA SEO Optimization 
<  if ((int)$HTTP_GET_VARS['products_id'] != "") {
<       require(DIR_WS_FUNCTIONS . 'seo.php');
<         echo getheaderdiv($HTTP_GET_VARS['products_id']);
<  }
< // ended seo optimization div
< ?>
146c132
<   <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="background-color:#ffffff;"> 
---
>   <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="background-image:url(<?php echo DIR_WS_TEMPLATES;?>/images/headerbg.jpg); background-color:#0099CC;">
148c134
<    <td width="298" valign="top" style="padding-left:4px; "><table border=0 cellpadding=0 cellspacing=0><tr><td><A HREF="<?php echo tep_href_link(FILENAME_DEFAULT);?>"><img border="0" src="<?php echo DIR_WS_TEMPLATES;?>/images/logo-top.gif" alt="<?php echo STORE_NAME;?>" title="<?php echo STORE_NAME;?>"></a></td><tr><tr><td><img border="0" src="<?php echo DIR_WS_TEMPLATES;?>/images/tagline.gif" alt="<?php echo STORE_NAME;?>" title="<?php echo STORE_NAME;?>"><td></tr></table></td>
---
Now the change is the additional style sheets and javascript, but also the addition of the seo module I developed (no, it's not for general release it's a major product differentiator based on many many hours of google analysis).

While using duplication of the main template is an option, it's not a good kluge. It's fast, and it means less code initially, but in the long term it could mean much more work if you are making design changes that are structural at the page level.

It's sort of the same logic that BTS uses in only taking from the /content area those pieces of /content that are not standard. The idea is to reduce maintenance complexity.

again, this is just my $0.02 based on having to maintain these things. YMMV.
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to met00 For This Useful Post:
mc8 (08-11-2007)
  #7  
Old 08-11-2007, 01:41 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: New Static Page without columns

Quote:
I hate to be repetitive, but that is going to be a maintenance nightmare
Again, it is a question of scale.

If managing many sites with customizations, many different templates, this would be a bad option.

On the other hand, if managing a single site and single template set, this is a great option that poses no long term problems. Just adding a single main template file, editing a single line in any pages that use the new template, and it is done. No muss. No fuss.

Quote:
While using duplication of the main template is an option, it's not a good kluge. It's fast, and it means less code initially, but in the long term it could mean much more work if you are making design changes that are structural at the page level.
Again it depends on how you go about things and the scale of the changes. For most users there really is no downside to doing things quick and dirty initially. With a quick solution to this problem and their site up and hopefully making money, they can take the time later to explore a better solution and pay for it if need be. The point is, the site is up and working the way they want it, at no cost, no time and no problem

This solution is not for every application, , but it is good to know it is an option.

Along those lines, I was thinking about a better way to extend BTS and it looks very easy to simply add a second and third case for main templates in the bts_select function in config_bts.php. It would be very easy to just add new template cases, and then simply specify this option in the bts_select include. That allows you to create unlimited main page templates without breaking out of the BTS function calls.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 08-11-2007, 10:05 PM
mc8 mc8 is offline
New Member
 
Join Date: Mar 2007
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
mc8 is on a distinguished road
Default Re: New Static Page without columns

Thank you both met00 and Michael -
Sorry to have started a design debate ... I understand the pros and cons of each solution...going with Michaels for now as it is only a one-off single page, but will surely will use the met00 solution for other situations.
thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 08-11-2007, 10:09 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: New Static Page without columns

Its all good. Talking about the many options and the pros and cons has spurred some new ideas, as usual. No need to apologize for kick starting a good discussion. That is what this place is all about.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 08-12-2007, 10:45 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 444
Thanks: 3
Thanked 75 Times in 70 Posts
Rep Power: 6
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: New Static Page without columns

I concur. The way one programmer would resolve and issue and the way another would differ based on everything from their general programming experience to their knowledge of specific that differ. For instance, I would never have looked at the BTS code the way Michael did. I was looking at not creating and maintaining more files, so that generally means more if-then-else logic to determine what should and shouldn't be done at processing time. Michael knows the BTS code far better than I, so he started looking there for the solution.

And that is the good part of having these levels of discussion.
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Add Printer Friendly Page to Static Pages? mjfontec osCMax v2 Customization/Mods 0 04-01-2007 07:37 PM
Added a new static page countingsheep osCMax v2 Customization/Mods 4 05-17-2006 08:23 PM
Adding FCKEditor Access Capabilites to new "static page dwsjr osCMax v2 Customization/Mods 1 11-27-2005 08:20 PM
How do I add HTML to My Newly Created Static Page Anonymous osCMax v1.7 Discussion 3 08-01-2005 05:47 AM
Static Page neo14706 osCommerce 2.2 Modification Help 0 04-24-2003 05:55 AM


All times are GMT -8. The time now is 06:44 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax