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-Cart StoreFront Customer Forum

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

 All Forums
 VPCart Forum
 Dynamic Header/Title in template
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

6 Posts

Posted - April 19 2004 :  10:13:24  Show Profile  Reply with Quote

I need to create a dynamic header for a custom category search. The custom category is 'New Items'. The new items in the database will have pother3 set to yes.

So 'New Items' will link to http://www.kansassampler.com/new/shopquery.asp?pother3=Yes

This works great.

But I need to add the header, which will be some html text - something like "This week we have blah, blah". I though a great way to do this would be to use a template such as -
http://www.kansassampler.com/new/shopquery.asp?pother3=Yes&template=tmp_productformat_newitems.htm - this seems to work well, (notice the purple bars to show it is using a new template).

Here's the problem - I can not insert dynamic text into this template.

I tried two ways:
1) Using an include file (e.g. <!--#include file content.txt" -->) in the template but using an .htm file will not include (http://www.kansassampler.com/new/tmp_productformat_newitems.htm) only an .asp will implement the include (http://www.kansassampler.com/new/tmp_productformat_newitems.asp)
But it seems VPASP ignores the code in the .asp or puts asp tags around it and it is ignored by the server.
2) I set up another database and pull it from a database, but getting this to display must use asp in the template which VPASP ignores..

Any ideas?

Senior Member

United Kingdom
1898 Posts

Posted - April 19 2004 :  12:47:27  Show Profile  Visit devshb's Homepage  Reply with Quote
if the url that's being loaded in the browser window has a .asp suffix, then its entire contents (including all included files) will also be treated like asp.
but i've yet to find a way of using includes in html parent files which works; rename your main (parent) page to an asp and all should be fine.

but, if you're talking about the template files, that's different; embedded asp in those might not get treated/processed like a normal include as it's simply read+pasted by the template-writing asp code.

if you want to add quite complex-derived dynamic text in the actual templates, you'll probably need to change shopfileio.asp and add a new special-field code and a corresponding function that prints the relevant html, and then use that special-field in the template.

I'm not sure exactly what you mean by "header" (ie per-product, or a browser header/title, or a top-page header etc), but I've recently been working on dynamic content for vpasp stuff, where you can make pretty much any part of the pages context-sensitive depending on product/category etc. If that's the kind of thing you're after, feel free to email me.

Simon Barnaby
Freelance Developer
Java-E UK
[email protected]

Edited by - devshb on April 19 2004 12:55:48
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000