Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Got it! Use different templates on pages!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

webpro
Starting Member

United Kingdom
11 Posts

Posted - February 26 2004 :  04:08:19  Show Profile  Visit webpro's Homepage  Reply with Quote
I've been working on a few VP projects - and have wanted the flexibility to use different header/trailer templates on different pages - i.e. on the products page, cart page, and on different bespoke pages.

How it's done:

1. Open shopheaders.asp and add a new sub - e.g:

Sub ShopPageTrailer2
%>
<!-- #include file="shoppage_trailer32.asp" -->
<%
end sub


(note - ShopPageTrailer2)

2. On the page - i.e. shopaddtocart.asp

Locate the sub that loads the header/trailer :-

' Sub display form
Sub DisplayForm()
ShopPageHeader
If Serror<>"" then
shopwriteerror serror
end if
arrCart = GetSessA("CartArray")
scartItem = GetSess("CartCount")
FormatFormFields
ShopPageTrailer
end sub


Then change ShopPageTrailer to ShopPageTrailer2

And that's it. You can add multiple subs for headers/trailers and get much more flexibility on the design - instead of using the same files for all pages/sections.

Hope this is useful.

Dave


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