Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 shoppage_header.asp??
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Justin
VP-CART New User

87 Posts

Posted - June 16 2002 :  01:12:41  Show Profile  Visit Justin's Homepage  Reply with Quote
I'm trying to make a dynamic replacement for shoppage_header.html and shoppage_trailer.html (shoppage_header.asp and shoppage_trailer respectively).

Has anyone else implemented something like this successfully?

My approach similar to the solution given when someone asked about putting the output of shopdisplaycategories.asp etc in a table - I've really just designed a page that works, cut the top half of the code and saved it as shoppage_header.asp, and the rest of the code becomes shoppage_trailer.asp. Also, I made changes to shop$db to reference these two .asp files.

The main problem I seem to be having is that if the recordsets are opened before the <head> tag in shoppage_header.asp then they don't seem to be available in shoppage_trailer.asp.

Actually... let me give you the error message:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/mjhb/shopping/shoppage_trailer.asp, line 26


... and line 26 from shoppage_trailer.asp:

While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))

Repeat1__numRows is a variable set up in shoppage_header.asp

Recordset2 is also set up in shoppage_header.asp

My feeling is that it's something to do with the Repeat1__numRows returning a null value (error message above wasn't very descriptive) because I've got a feeling it would be a different error message if Recordset2.EOF was returning a null.

So I'm just wondering if anyone else has done this successfully, '#include'-ing .asp files for the headers and trailers, and how you got around it. I'm sure it's just a line of code that I have forgotten somewhere...

Thanks!

JL





Amanda
Starting Member

USA
15 Posts

Posted - January 27 2004 :  20:36:07  Show Profile  Reply with Quote
did you ever get the seperate headers to work

quote:

I created separate shopheader and shoptrailer files and defined them in shop$db.asp

Sub ShopPageHeader
%>
<!-- #include file="shoppage_header.htm" -->
<%
end sub
Sub ShopPageTrailer
%>
<!-- #include file="shoppage_trailer.htm" -->
<%
end sub
Sub AdminPageTrailer
%>
<!-- #include file="shopadmin_trailer.htm" -->
<%
end sub
Sub AdminPageHeader
%>
<!-- #include file="shopadmin_header.htm" -->
<%
end sub
Sub ShopPageHeader2
%>
<!-- #include file="shoppage_header2.htm" -->
<%
end sub
Sub ShopPageTrailer2
%>
<!-- #include file="shoppage_trailer2.htm" -->
<%
end sub
Sub ShopPageHeadern
%>
<!-- #include file="shoppage_headern.htm" -->
<%
end sub
Sub ShopPageTrailern
%>
<!-- #include file="shoppage_trailern.htm" -->

Then, I specified in my code on the pages where those headers and trailers needed to display:

ShopPageHeadern ' Page header for shop
CategoryHeader ' category header on this page
Showcategories ' format categories on this page
ShopPageTrailern ' shop page trailer

I also want to create dynamic headers that go one step further and are different for each category -- anyone have ideas on how to do that?

Thanks!





Go to Top of Page

Justin
VP-CART New User

87 Posts

Posted - February 09 2004 :  19:38:28  Show Profile  Visit Justin's Homepage  Reply with Quote
quote:

I also want to create dynamic headers that go one step further and are different for each category -- anyone have ideas on how to do that?

Thanks!





Thanks for your replies. Actually, this is like what I wanted to do too.

JL

Go to Top of Page

Justin
VP-CART New User

87 Posts

Posted - February 09 2004 :  21:32:29  Show Profile  Visit Justin's Homepage  Reply with Quote
ACTUALLY....

I don't have time to look it up right now, but I think haktil's page has something similar, with his breadcrumbs feature. I'll check it out later, but you might like to check it out yourself in the mean time.

JL

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00