Posted - February 26 2004 : 04:08:19
| 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:
<!-- #include file="shoppage_trailer32.asp" -->
(note - ShopPageTrailer2)
2. On the page - i.e. shopaddtocart.asp
Locate the sub that loads the header/trailer :-
' Sub display form
If Serror<>"" then
arrCart = GetSessA("CartArray")
scartItem = GetSess("CartCount")
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.