BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PageProducer

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
Jack
Guest





PostPosted: Thu Mar 15, 2007 6:37 pm    Post subject: PageProducer Reply with quote



Hi,

My ISAPI app contains the same page header and page footer. How would I use
the same pageproducer so that only main content is different for each page?
Would I still need a separate pageproducer for each page/action?

Thanks.
Back to top
Mark Horrocks
Guest





PostPosted: Fri Mar 16, 2007 6:11 am    Post subject: Re: PageProducer Reply with quote



Hi Jack,

This is easy to do. Simply use a second page producer to do the header and
footer. (and any other templates you want to add to your page along the way)

In PageProducer1.HTMLTag event I have the following code

if (AnsiCompareText(TagString, 'TAG') = 0) then
ReplaceText := strHTMLString

else if (AnsiCompareText(TagString, 'HEADER') = 0) then
begin
strWebPage := HTMLPath + 'Header.html';
PageProducer2.HTMLFile := strWebPage;
ReplaceText := PageProducer2.Content;
end

else if (AnsiCompareText(TagString, 'FOOTER') = 0) then
begin
strWebPage := HTMLPath + 'Footer.html';
PageProducer2.HTMLFile := strWebPage;
ReplaceText := PageProducer2.Content;
end;

I save the main content to strHTMLString and replace it at <#TAG> in my web
page.

At the top of the page I have a tag <#HEADER> and <#FOOTER> at the bottom.

cheers,

Mark Horrocks


"Jack" <user (AT) nomail (DOT) com> wrote in message
news:45f94c07$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

My ISAPI app contains the same page header and page footer. How would I
use the same pageproducer so that only main content is different for each
page? Would I still need a separate pageproducer for each page/action?

Thanks.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.