RE: [Templates] Processing a plugins output?

[prev] [thread] [next] [Date index for 2005/03/15]

From: Simon Matthews
Subject: RE: [Templates] Processing a plugins output?
Date: 15:22 on 15 Mar 2005
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.&nbsp; 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>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; From: J. Shirley [<A =
HREF=3D"mailto:jshirley@xxxxx.xxx">mailto:jshirley@xxxxx.xxx</A>;] =
</FONT>
<BR><FONT SIZE=3D2>&gt; Sent: 15 March 2005 15:14</FONT>
<BR><FONT SIZE=3D2>&gt; To: Simon Matthews</FONT>
<BR><FONT SIZE=3D2>&gt; Cc: templates@xxxxxxxxxxxxxxxx.xxx</FONT>
<BR><FONT SIZE=3D2>&gt; Subject: Re: [Templates] Processing a plugins =
output?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Thanks for the headsup -- Is that the only =
method to do it?&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; I deally I would just like to place the tag =
(it's a plugin to </FONT>
<BR><FONT SIZE=3D2>&gt; interface with a</FONT>
<BR><FONT SIZE=3D2>&gt; CMS) like &quot;[% content(&quot;foo&quot;) =
%]&quot; and have it automatically do it?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Sorry for the basic questions, still learning =
TT.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; On Tue, 15 Mar 2005 15:00:51 -0000, Simon =
Matthews </FONT>
<BR><FONT SIZE=3D2>&gt; &lt;sam@xxxxxxxxxxxxx.xxx&gt; wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; &gt;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; You are looking for the eval =
filter.</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; <A HREF=3D"http://www.template-"; =
TARGET=3D"_blank">http://www.template-</A>&gt; =
toolkit.org/docs/plain/Manual/Filters.html#eval_ev</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; altt</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; HTH</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; S</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; From: J. Shirley [<A =
HREF=3D"mailto:jshirley@xxxxx.xxx">mailto:jshirley@xxxxx.xxx</A>;] =
</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Sent: 15 March 2005 14:23 </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; To: templates@xxxxxxxxxxxxxxxx.xxx =
</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Subject: [Templates] Processing a =
plugins output? </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Hey guys,</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Sorry for this question, I'm sure it =
gets posted rather </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; frequently but I couldn't find a way =
to search the archives.&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; I'm trying to build a plugin that =
will have output that I </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; want to have processed. </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; So, if the plugin outputs &quot;This =
is my [% foo_variable %]&quot; how</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; do I get the output of the template =
to be processed accordingly? </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; Thanks,</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; -J </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; =
_______________________________________________</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; templates mailing list </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; templates@xxxxxxxxxxxxxxxx.xxx =
</FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; <A HREF=3D"http://lists.template-"; =
TARGET=3D"_blank">http://lists.template-</A>&gt; =
toolkit.org/mailman/listinfo/templates </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; &gt;</FONT>
<BR><FONT SIZE=3D2>&gt; </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?
J. Shirley 14:23 on 15 Mar 2005

RE: [Templates] Processing a plugins output?
Simon Matthews 15:00 on 15 Mar 2005

Re: [Templates] Processing a plugins output?
J. Shirley 15:14 on 15 Mar 2005

RE: [Templates] Processing a plugins output?
Simon Matthews 15:22 on 15 Mar 2005

Generated at 21:07 on 16 Mar 2005 by mariachi v0.52