basically, at the end tag, it sets yourVariable = thistag.generatedcontent,
and sets thistag.generatedcontent = ''.
It means by the time you start have to think about the title you've done all
your processing, and can have set variables for the title, meta stuff etc:
eg
<cf_bodycontent name="mystuff">
All your processing, and formatting etc etc
<!-- you can set variables, like the title where ever you like -->
<cfset title = "the result of some processing">
<cfset myKeywords= "keywords and other stuff etc">
</cf_bodycontent>
<!-- at this point _nothing_ has been written to the browser - its all in a
variable called "mystuff".
this will be the first bit of text when you view source in a browser,
except for whitespace -->
<html>
<head>
<title>#title#<title>
<META NAME="Keywords" CONTENT="#myKeywords#">
</head>
<body>
#mystuff#
</body>
</html>
excuse the non JSP code, but you get the idea...?
Bert
> -----Original Message-----
> From: Regina Moore [mailto:[EMAIL PROTECTED]]
> Sent: 27 April 2001 16:32
> To: JRun-Talk
> Subject: RE: Equivalent of <cfhtmlhead>?
>
>
> I'm not sure what cf_bodycontent does, but if it just
> evaluates content
> between the opening and closing tags of a jsp custom tag,
> there is already
> way to do that. I'm trying to access and modify html content
> that occurs
> before the custom tag ever gets called.
>
> -----Original Message-----
> From: Bert Dawson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 10:53 AM
> To: JRun-Talk
> Subject: RE: Equivalent of <cfhtmlhead>?
>
>
> sounds like we need a jsp version of cf_bodycontent....
> I've kind of hashed one up, but it doesn't work too well...
>
> What it should do is everything between the tag is returned
> as a variable,
> but not actually output to screen (or buffer?).
> eg if the template is:
>
> <!------------------------------------------->
> <jsp_bodycontent return="myvar">
> some text
> </jsp_bodycontent>
>
> some other text
> <%= myvar %>
> <!------------------------------------------->
>
>
> Then what appears on the page is:
>
> some other text
> some text
>
> Does that make sense?
> The problem i found with the tag i wrote was that if i included a file
> within the tag, then the contents of the included file were
> not captured my
> mytag.generated content....
>
> Bert
>
> ps apologies for cross post but it seems appropriate
>
>
> > -----Original Message-----
> > From: Regina Moore [mailto:[EMAIL PROTECTED]]
> > Sent: 27 April 2001 15:37
> > To: JRun-Talk
> > Subject: Equivalent of <cfhtmlhead>?
> >
> >
> > speaking of equivalent to a cf tag...
> > Here's one that's stumped me. I'm trying to replicate the
> > functionality of
> > <cfhtmlhead>. So basically, I need to create a custom tag
> > that when called,
> > will modify the <head> tag of the calling jsp. The problem
> > is that the
> > <head> tag in the calling jsp occurs before the custom tag.
> > So how can I go
> > back and modify something that's already been done? Here's
> > an example of
> > what the calling jsp would look like:
> > <html>
> > <head></head>
> > <body>
> > <mytaglib:mytag/>
> > </body>
> > and what i want to do inside the custom tag is manipulate the
> > html <head>
> > tag to contain a few lines of javascript. But how do you
> > manipulate content
> > that comes BEFORE the call to the custom tag?
> > I've come up with a very dirty solution that involves
> > creating a new jsp,
> > copying the contents of the old jsp to the new jsp, and then
> > modifying the
> > <head> tag during the copy. But that opens up a whole new
> > bag of worms.
> > Anyone have any other ideas???
> > thx
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists