 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jack Guest
|
Posted: Thu Mar 15, 2007 6:37 pm Post subject: PageProducer |
|
|
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
|
Posted: Fri Mar 16, 2007 6:11 am Post subject: Re: PageProducer |
|
|
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 |
|
 |
|
|
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
|
|