Author |
Topic |
|
gymrat
Starting Member
34 Posts |
Posted - May 15 2008 : 06:27:20
|
I want to create a site that shows my company logo on every page EXCEPT for my homepage (default.asp). In the homepage, I want to keep everything (utility bar, navigation bar) except for the web elements on the left hand side. If I take the web elements out of the shoppage_header.htm file, it will be taken out of all my pages right? Can anyone help please???? |
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - May 15 2008 : 06:41:27
|
Correct; shoppage_header.htm is used for all pages.
The good news is that although that's named as an htm file, it's actually processed as if it was an asp file so you can embed vbscript within it, so you could put something like this in it where you display the logo:
<% if instr(lcase(request.ServerVariables("SCRIPT_NAME")), "default.asp") > 0 then %> (put your html, if any, for the default.asp page here) <% else %> (put your html, if any, for the non-default.asp pages here) <% end if %>
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
gymrat
Starting Member
34 Posts |
Posted - May 15 2008 : 20:23:37
|
Thanks very much for the replies. I have tried Carrol's solution but ended up getting an error message
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'shoppageheadernologo'
/shop/default.asp, line 28
I am using vpasp 6.5 and do not see <%shoppageheader%>, I only see shoppageheader in default.asp (line 28). And when I tried changing it to the sub I created (in my case, shoppageheadernologo), I got the error.
Any ideas?
Simon, thanks for your script. Would this mean I have to write URLs of all non-default.asp pages? |
|
|
THeVerve
VP-CART New User
117 Posts |
Posted - May 16 2008 : 01:55:28
|
Where did you create shoppageheadernologo.asp ? You need to create this in shophaders.asp. |
|
|
gymrat
Starting Member
34 Posts |
Posted - May 16 2008 : 03:01:58
|
I created it in shopheader.asp right underneath the sub shoppageheader. i copied sub shoppageheader and changed <!--include fiel="shoppage_header.htm"-->
to
<!--include fiel="shoppage_headernologo.htm"-->
then created a shoppage_headernologo.htm file.
went to default.asp to change <%shoppageheader%> but there was no such text. only shoppageheader on line 28 (after "initializeSystem "line).
so i assumed shoppageheader is the same as <%shoppageheader%> and went to change it to
shoppageheadernologo
but got an error. as shown in my previous post. Does anyone know where <%shoppageheader%> is in the default.asp file in vpasp6.5?? |
|
|
carfin
VP-CART Expert
United Kingdom
948 Posts |
Posted - May 16 2008 : 04:18:17
|
Hi,
I think Simon's way of acheiving this is probably the easiest.
For the logo, open shoppage_header.htm and find the header <div> tag. Change the code to the following: (use your own image file names and sizes)
<div id="header"> <table> <tr> <td>
<% if instr(lcase(request.ServerVariables("SCRIPT_NAME")), "default.asp") > 0 then %>
<img src="images/header/HomePagelogo.gif" width="150" height="33" id="logo" alt="Logo" title="HomePagelogo" />
<% else %>
<img src="images/header/Otherlogo.gif" width="150" height="33" id="logo" alt="Logo" title="Otherlogo" />
<% end if %>
</td> <td class="headerlinks"> <%NavigateShowMiniCartRight "short"%> </td> </tr> </table> <div class="cb"> </div> </div>
You don't need to add URLs or anything for each page, just the source of the image.
You can use the same logic to hide the left column and tables on default.asp, but still be available on all other pages.
eg. <% if instr(lcase(request.ServerVariables("SCRIPT_NAME")), "default.asp") > 0 then %> <td class="vt" id="main"> <!-- END OF SHOPPAGE_HEADER.HTM --> <%else%> <td class="vt" id="left" ......etc. etc.
<%end if%>
Hope this helps,
Carrol www.deanston-electrical.co.uk |
|
|
gymrat
Starting Member
34 Posts |
Posted - May 16 2008 : 10:27:08
|
This is perfect! Got it to work. Thanks so much Carrol and Simon. |
|
|
|
Topic |
|