[prev] [thread] [next] [Date index for 2005/03/15]
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C52972.CB1E4804 Content-Type: text/plain The short answer is that there is always more than 1 way to do it. In a plugin you have access to the context object. You can call process on the context object and pass it the text to be processed as the first argument as a reference. S > -----Original Message----- > From: J. Shirley [mailto:jshirley@xxxxx.xxx] > Sent: 15 March 2005 15:14 > To: Simon Matthews > Cc: templates@xxxxxxxxxxxxxxxx.xxx > Subject: Re: [Templates] Processing a plugins output? > > > Thanks for the headsup -- Is that the only method to do it? > I deally I would just like to place the tag (it's a plugin to > interface with a > CMS) like "[% content("foo") %]" and have it automatically do it? > > Sorry for the basic questions, still learning TT. > > > On Tue, 15 Mar 2005 15:00:51 -0000, Simon Matthews > <sam@xxxxxxxxxxxxx.xxx> wrote: > > > > > > You are looking for the eval filter. > > > > > http://www.template-> toolkit.org/docs/plain/Manual/Filters.html#eval_ev > > altt > > > > HTH > > > > S > > > > > -----Original Message----- > > > From: J. Shirley [mailto:jshirley@xxxxx.xxx] > > > Sent: 15 March 2005 14:23 > > > To: templates@xxxxxxxxxxxxxxxx.xxx > > > Subject: [Templates] Processing a plugins output? > > > > > > > > > Hey guys, > > > Sorry for this question, I'm sure it gets posted rather > > > frequently but I couldn't find a way to search the archives. > > > I'm trying to build a plugin that will have output that I > > > want to have processed. > > > > > > So, if the plugin outputs "This is my [% foo_variable %]" how > > > do I get the output of the template to be processed accordingly? > > > > > > Thanks, > > > -J > > > > > > _______________________________________________ > > > templates mailing list > > > templates@xxxxxxxxxxxxxxxx.xxx > > > http://lists.template-> toolkit.org/mailman/listinfo/templates > > > > > > > > ------_=_NextPart_001_01C52972.CB1E4804 Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3DUS-ASCII"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2653.12"> <TITLE>RE: [Templates] Processing a plugins output?</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>The short answer is that there is always more than 1 = way to do it.</FONT> </P> <P><FONT SIZE=3D2>In a plugin you have access to the context = object. You can call process on the context object and pass it = the text to be processed as the first argument as a = reference.</FONT></P> <P><FONT SIZE=3D2>S</FONT> </P> <BR> <BR> <P><FONT SIZE=3D2>> -----Original Message-----</FONT> <BR><FONT SIZE=3D2>> From: J. Shirley [<A = HREF=3D"mailto:jshirley@xxxxx.xxx">mailto:jshirley@xxxxx.xxx</A>] = </FONT> <BR><FONT SIZE=3D2>> Sent: 15 March 2005 15:14</FONT> <BR><FONT SIZE=3D2>> To: Simon Matthews</FONT> <BR><FONT SIZE=3D2>> Cc: templates@xxxxxxxxxxxxxxxx.xxx</FONT> <BR><FONT SIZE=3D2>> Subject: Re: [Templates] Processing a plugins = output?</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> Thanks for the headsup -- Is that the only = method to do it? </FONT> <BR><FONT SIZE=3D2>> I deally I would just like to place the tag = (it's a plugin to </FONT> <BR><FONT SIZE=3D2>> interface with a</FONT> <BR><FONT SIZE=3D2>> CMS) like "[% content("foo") = %]" and have it automatically do it?</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> Sorry for the basic questions, still learning = TT.</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> On Tue, 15 Mar 2005 15:00:51 -0000, Simon = Matthews </FONT> <BR><FONT SIZE=3D2>> <sam@xxxxxxxxxxxxx.xxx> wrote:</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > You are looking for the eval = filter.</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> <A HREF=3D"http://www.template-" = TARGET=3D"_blank">http://www.template-</A>> = toolkit.org/docs/plain/Manual/Filters.html#eval_ev</FONT> <BR><FONT SIZE=3D2>> > altt</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > HTH</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > S</FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> > > -----Original Message-----</FONT> <BR><FONT SIZE=3D2>> > > From: J. Shirley [<A = HREF=3D"mailto:jshirley@xxxxx.xxx">mailto:jshirley@xxxxx.xxx</A>] = </FONT> <BR><FONT SIZE=3D2>> > > Sent: 15 March 2005 14:23 </FONT> <BR><FONT SIZE=3D2>> > > To: templates@xxxxxxxxxxxxxxxx.xxx = </FONT> <BR><FONT SIZE=3D2>> > > Subject: [Templates] Processing a = plugins output? </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > > Hey guys,</FONT> <BR><FONT SIZE=3D2>> > > Sorry for this question, I'm sure it = gets posted rather </FONT> <BR><FONT SIZE=3D2>> > > frequently but I couldn't find a way = to search the archives. </FONT> <BR><FONT SIZE=3D2>> > > I'm trying to build a plugin that = will have output that I </FONT> <BR><FONT SIZE=3D2>> > > want to have processed. </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > > So, if the plugin outputs "This = is my [% foo_variable %]" how</FONT> <BR><FONT SIZE=3D2>> > > do I get the output of the template = to be processed accordingly? </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > > Thanks,</FONT> <BR><FONT SIZE=3D2>> > > -J </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > > = _______________________________________________</FONT> <BR><FONT SIZE=3D2>> > > templates mailing list </FONT> <BR><FONT SIZE=3D2>> > > templates@xxxxxxxxxxxxxxxx.xxx = </FONT> <BR><FONT SIZE=3D2>> > > <A HREF=3D"http://lists.template-" = TARGET=3D"_blank">http://lists.template-</A>> = toolkit.org/mailman/listinfo/templates </FONT> <BR><FONT SIZE=3D2>> > > </FONT> <BR><FONT SIZE=3D2>> > </FONT> <BR><FONT SIZE=3D2>> ></FONT> <BR><FONT SIZE=3D2>> </FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C52972.CB1E4804-- _______________________________________________ templates mailing list templates@xxxxxxxxxxxxxxxx.xxx http://lists.template-toolkit.org/mailman/listinfo/templates
|
[Templates] Processing a plugins output?
|
|
RE: [Templates] Processing a plugins output?
|
|
Re: [Templates] Processing a plugins output?
|
|
RE: [Templates] Processing a plugins output?
|
Generated at 21:07 on 16 Mar 2005 by mariachi v0.52