VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Showing logo on everything else but the homepage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gymrat
Starting Member

34 Posts

Posted - May 15 2008 :  06:27:20  Show Profile  Reply with Quote
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-ASP Expert

United Kingdom
948 Posts

Posted - May 15 2008 :  06:40:53  Show Profile  Reply with Quote
Hi,

there's some information on using different headers and trailers throughout your site in the following post

http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=6744

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - May 15 2008 :  06:41:27  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page

gymrat
Starting Member

34 Posts

Posted - May 15 2008 :  20:23:37  Show Profile  Reply with Quote
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?
Go to Top of Page

THeVerve
VP-ASP New User

117 Posts

Posted - May 16 2008 :  01:55:28  Show Profile  Reply with Quote
Where did you create shoppageheadernologo.asp ? You need to create this in shophaders.asp.
Go to Top of Page

gymrat
Starting Member

34 Posts

Posted - May 16 2008 :  03:01:58  Show Profile  Reply with Quote
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??
Go to Top of Page

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - May 16 2008 :  04:18:17  Show Profile  Reply with Quote
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
Go to Top of Page

gymrat
Starting Member

34 Posts

Posted - May 16 2008 :  10:27:08  Show Profile  Reply with Quote
This is perfect! Got it to work. Thanks so much Carrol and Simon.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000