ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Getting Started
  New Posts New Posts RSS Feed - How to set up seperate pages with header/footer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set up seperate pages with header/footer

 Post Reply Post Reply Page  <12
Author
Message
BlackReefDesigns View Drop Down
Newbie
Newbie


Joined: 28-May-2008
Location: San Diego, CA
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote BlackReefDesigns Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2008 at 5:46am
Assuming Im using HeaderW and HeaderF, this will be the only code I put in the header.asp?   And what does home.asp recognize as the main page?  maybe I should get some sleep and tackle this in the morning.  my brain is mush, hehe
 
<% if headerw=1 then %>
<!--#include file="headerW.asp"-->            
<% else %>
<!--#include file="headerF.asp"-->            
<% end if %>


Edited by BlackReefDesigns - 25-June-2008 at 5:54am
Joe S.
BlackReef.net
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2008 at 6:07am
It must be mad o'clock there !! :-)

All you will need is some code to read the cookie var and the code as shown, nothing else.

home.asp and all the customer facing pages #include the header and footer files so you new versions will automatically be used and pick up the new variations of the files automatically.
 



Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2008 at 6:11am
Get some zzzz's Sleepy and then take a look at :-
http://www.w3schools.com/asp/default.asp - A good basic into to asp & vbscript are available there, including using cokkie based vars.
Back to Top
BlackReefDesigns View Drop Down
Newbie
Newbie


Joined: 28-May-2008
Location: San Diego, CA
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote BlackReefDesigns Quote  Post ReplyReply Direct Link To This Post Posted: 25-June-2008 at 10:58pm
Hamish - Thank you again for your help.
 
So this is what I did.
 
I created the headerwide.asp and footerwide.asp <---100% Table Width
 
I also created headerfull.asp and footerfull.asp <----800px Table Width
 
The Footer is identical in both instances.
 
The next thing I did was opened the header.asp and erased everything and put this in:
 
<% if headerw=1 then %>
<!--#include file="headerwide.asp"-->           
<% else %>
<!--#include file="headerfull.asp"-->           
<% end if %>
 
I saved the header.asp, and uploaded all 6 files.  It should be noted that all 3 footer files are identical.
 
Im pretty sure thats the way you explained it to me.  Now, this is where I get lost.  How do I set it up on the splash page so the customers can select between wide and full?  Obviously there is no .asp files to link the pages to, so how do I set it up so the customer can choose thier version?
Joe S.
BlackReef.net
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post Posted: 26-June-2008 at 4:41am
Hi, I personally wouldn't bother with a "splash" page. Customers will not always arrive on your site via the same route & I think the less there is between the customers and choosing the goods the better.
I would use a button in the header to toggle between the wide and narrow, the code behind the button toggling the value of the headerw var - which is stored & retrieved from the cookie file.  If you do want a splash page as well you can add the code to set the  cookie var in there. You could make the splash page choice using javascript.

Using ASP to work with cookies :-  http://www.w3schools.com/asp/asp_cookies.asp
Using Javascript to work with cookies :- www.w3schools.com/js/js_cookies.asp

If you use javascript ONLY use it on the splash page - it's not suitable for the ASP pages as otherwise both copies of your header will be sent to the browser as the javasc rpit executes in the browser not the server.

In header.asp you must add asp code at the beginning  to retrieve, or attempt to retrieve the cookie var headerw  (Actually the cookie vars name can be anything - it's value must end up in  vbscript var headerw).

6 files? If you haven't changed footer.asp then you only need that version of footer.asp & can delete the other two.
 
Back to Top
 Post Reply Post Reply Page  <12
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.