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 Topic: How to set up seperate pages with header/footer
    Posted: 11-June-2008 at 10:32pm

Wanting to go with two seperate page formats:  Full Screen and Widescreen.  I was thinking about copying "store" directory and duplicating it, and naming one store directory "full" and the other "wide" and have a splash page where the user can choose widescreen or fullscreen.

 
For example, if the user chooses widescreen, it will take them to wide/pc/home.asp, while the full screen path will go full/pc/home.asp

Is this the best/easiest way to achieve this?  please advise
 
thanks
Joe
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: 12-June-2008 at 5:20am
Hi Joe,
     That's a route I would really really avoid.
Having TWO copies of the code in a single site makes maintenance more of a headache.
Customers expect any width detection to happen automatically & there's plenty of code on the web to help do that.  If you want them to be able to choose then  perhaps use the same/similar method as is used on :
http://demotemplates.joomlashack.com/lightfast/
(See the  ||  and <>  buttons on the right near the top ).

I would, off the top of my head, add code to header.asp to switch between the two versions.

I don't recall seeing any variable width ProductCart sites, and I haven't looked into it myself. - Actually, I've just done a small experiment & changed a site to a width of "90%" instead of a fixed 770px and, apart from the graphic in the header it looks fine.  
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: 12-June-2008 at 5:58am
Thanks Hamish -
 
Do you know of any resources off the top of your head I could look into adding code to the header.asp?
 
The clients really want a widescreen version so I gotta figure something out  =)
 
Thanks


Edited by BlackReefDesigns - 12-June-2008 at 5:59am
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: 12-June-2008 at 7:36am
Why not try a flexible width version.
To try it out set the  main table in your  header file  to, say,  :- 
<table width="90%"  align="center"  class="yourClass">

Take a look and see what the impact is.  If you have a header image across the width of the page which then looks wrong either change it to "blend" into the background, or set it to auto resize.
If your site is live then either try it on a test copy or you can use a copy of header.asp and, say, viewprd.asp and add TST (or whatever) to the front of the file names & amend TSTviewprd.asp to use TSTheader.asp so you can experiment on the "live" site without impacting live customers.

If you want to go the route of the example Joomla site, then you will have to examine the source code and javascript etc on their sample site.
Is the client going to pay you extra for creating two versions, or is it already in your contract?  (None of my business - no need to answer that one - it's just a thought)
 
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 12:39am

Hamish -


The 'widescreen' format actually has a 100% table width, and the 'fullscreen' is only a 800px wide table.
 
anyways, I wrote this question to support:
 
I need to create a secondary web page. The clients want a Widescreen and Fullscreen version of the website, and I have created both pages, but obviously there can only be one Header/Footer.asp How can I set it up so I can use 2 different Header/Footer.asp files with the same page but different design layout?

I want to set it up so the customer has an option of selecting 'Widescreen' or 'Standard' on the splash page.

Example:
Widescreen = headerwide.asp, footerwide.asp

FullScreen = Header.asp, Footer.asp

I know the above won't work, but Im trying to illustrate what I need done. The only think I can think of doing would be to dupliate the entire PC folder and have the 2 links running to the two different folders, one PC folder having the widepage format, the other PC folder containing the Fullscreen

 
 
this is the response I had from ProductCart regarding this:
 
 
"A different folder is a good idea, but all you'd really need to do is to insert some logic which would go something like:

If "fullscreen mode" then "include fullscreen header"
elseif "widescreen mode" then "include widescreen header"
else "include regular header".

You can do this with folders also, but it would be better if you just had the IF statement above with the include for the different headers and footers.  "
 

not quite sure what that means, or where I would put the code, hehe. 



Edited by BlackReefDesigns - 25-June-2008 at 12:51am
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 4:15am
OK,
  Using their same pseudo-code I would keep ONE set of folders and create two versions of header & footer.
headerW, footerW   & headerF, footerF

Then header.asp and footer.asp become a small strub of code like :-

If "fullscreen mode" then
        "include fullscreen header"
else
    "include widescreen header"
endif

That way, as they say, you only have to maintain 1 set of code. The footer.asp would be the same except choosing between the two versions of footer.
You could either havr the customer choose before entering, or, nicer IMHO have a graphic button in each header to allow them to toggle between the two versions. If you store the value in the cookie then they will always keep the version they have selected, until they decide to change it.


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 4:46am
Thanks Hamish
So, Im still a bit lost.  So I create both versions of the header/footer (wide and full) and place all 4 files in the PC folder?  I think I understand the concept but dont know how to go about plugging it in
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 5:26am
Yes, 
   Create the four versions.
Then header.asp and footer.asp just become bits of code to select which version of each file is used  based on the variable from  the cookie, in this case the var is called headerw :

<% if headerw=1 then %>
<!--#include file="headerW.asp"-->            
<% else %>
<!--#include file="headerF.asp"-->            
<% end if %>

The downside to this approach is there will be a small performance hit as the includes are done at the server regardless, but only the required one will be sent to the browser.
An alternative approach would be to use that same if structure around the parts of header & footer that you wish to have different versions of, but to start I would go the route of separate header & footers as I suspect the impact would be minor and the maintenance much easier.   
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 5:36am
Ok
 
Thanks for being patient with me.  So.....I have my Header/Footer files for both my Widescreen and Fullscreen page (4 files)   I think I am overthinking this or something because I am confused as heck right now, hehe.   So I add the 4 new files to the PC folder and keep the old Header/Footer.asp in the folder?  And they use the old header/footers for code?
 
Basically I need to know how do I modify the older Header/Footer.asp after I put the 4 new files in.   Do I add this:
 
<% if headerw=1 then %>
<!--#include file="headerW.asp"-->            
<% else %>
<!--#include file="headerF.asp"-->            
<% end if %>
 
or
 
If "fullscreen mode" then
        "include fullscreen header"
else
    "include widescreen header"
endif
 
and where do I add this to the header/footer.asp?

Thanks


Edited by BlackReefDesigns - 25-June-2008 at 5:36am
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 5:42am
The first version - That's in ASP/vbscript.
Effectively you are scrapping the existing header/footer and replacing them with code to select between the two alternate styles.
Don't forget you need to grab the variable headerw from the cookie - For an example of code doing that check pc/login.asp
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.