Re: "ignore" a section
Lathan Bidwell <[email protected]> Mon, 7 Mar 2016 15:45:22 -0500
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAOqPvqjbsCJTwc=y9h6rV+i09y660PEpoS0mx8fY0s23Tq1-_A@mail.gmail.com> |
--===============8946444458838828100== Content-Type: multipart/alternative; boundary=001a11444df04d6dc2052d7b8c6c --001a11444df04d6dc2052d7b8c6c Content-Type: text/plain; charset=UTF-8 You could do: [% SET J = '$'; %] $J(document) ....Processes to...: $(document) *Lathan Bidwell*Web Programmer Division of Integrated Marketing & Communication Andrews University 269-471-6313 *office*www.andrews.edu "Seek Knowledge. Affirm Faith. Change the World." On Mon, Mar 7, 2016 at 3:19 PM, Richard Thomas <[email protected]> wrote: > That's why I avoid using the INTERPOLATE configuration option, to be > honest. But once you have code everywhere that uses it, it's difficult to > remove. > > Is the reverse an option? eg place the line in regular tags and > single-quote to avoid interpolation by TT? > > <script>[% '$(document)' %].ready({... > > cheers > RET > > Sent from my iPad > > On 8 Mar 2016, at 6:58 AM, Lathan Bidwell <[email protected]> wrote: > > You could stop using $'s outside of TT tags, and turn off the Interpolate > configuration: > > http://template-toolkit.org/docs/manual/Config.html#section_INTERPOLATE > > > *Lathan Bidwell* > > On Mon, Mar 7, 2016 at 2:37 PM, Aaron Macks <[email protected]> wrote: > >> I was trying to avoid having another file to manage, especially since >> this is only used in a single place and only a single line of code. >> >> Aaron >> >> On 3/7/16 2:35 PM, Steven Cotton wrote: >> > On 7 March 2016 at 19:12, Aaron Macks <[email protected] >> > <mailto:[email protected]>> wrote: >> > >> > the problem is that TT tries to interpolate the $ and it all gets >> > messed up >> > >> > >> > WRAPPER blocks are processed. You could call INSERT at the end of your >> > wrapper, which will deliver the file as-is: >> > >> > http://template-toolkit.org/docs/manual/Directives.html#section_INSERT >> > >> > Steve. >> >> -- >> _______________________________________________________ >> Aaron Macks([email protected]) [http://www.wiglaf.org/~aaronm ] >> My sheep has seven gall bladders, that makes me the King of the Universe! >> >> _______________________________________________ >> templates mailing list >> [email protected] >> http://mail.template-toolkit.org/mailman/listinfo/templates >> > > _______________________________________________ > templates mailing list > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates > > > _______________________________________________ > templates mailing list > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates > > --001a11444df04d6dc2052d7b8c6c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">You could do:<div><br></div><div>[% SET J =3D '$';= %]</div><div>$J(document)</div><div><br></div><div><br></div><div>....Proc= esses to...:</div><div><br></div><div>$(document)</div></div><div class=3D"= gmail_extra"><br clear=3D"all"><div><div class=3D"gmail_signature"><div dir= =3D"ltr"><div><div dir=3D"ltr"><b style=3D"color:rgb(0,0,0);font-family:Cal= ibri,sans-serif;font-size:14px"><div><br></div><div style=3D"font-family:Ve= rdana,Helvetica,Arial;font-size:9pt">Lathan Bidwell</div><br></b><font styl= e=3D"color:rgb(0,0,0);font-family:Verdana,Helvetica,Arial;font-size:x-small= "><span style=3D"font-size:8pt">Web Programmer<span><br>Division of Integra= ted Marketing & Communication<br>Andrews University<br><br></span><span= ><span title=3D"Call with Google Voice">269-471-6313</span>=C2=A0=C2=A0</sp= an><b>office<br></b><span><a href=3D"http://www.andrews.edu/" style=3D"colo= r:rgb(17,85,204)" target=3D"_blank">www.andrews.edu</a><br><br>"Seek K= nowledge.=C2=A0 Affirm Faith.=C2=A0 Change the World."</span></span></= font><br><div><br></div></div></div></div></div></div> <br><div class=3D"gmail_quote">On Mon, Mar 7, 2016 at 3:19 PM, Richard Thom= as <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">r= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir= =3D"auto"><div>That's why I avoid using the INTERPOLATE configuration o= ption, to be honest. But once you have code everywhere that uses it, it'= ;s difficult to remove.</div><div><br></div><div>Is the reverse an option? = eg place the line in regular tags and single-quote to avoid interpolation b= y TT?</div><div><br></div><div><script>[% '$(document)' %].re= ady({...</div><div><br></div><div>cheers</div><div>RET</div><div><br>Sent f= rom my iPad</div><div><div class=3D"h5"><div><br>On 8 Mar 2016, at 6:58 AM,= Lathan Bidwell <<a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a>> wrote:<br><br></div><blockquote type=3D"cite"><= div><div dir=3D"ltr">You could stop using $'s outside of TT tags, and t= urn off the Interpolate configuration:<div><br></div><div><a href=3D"http:/= /template-toolkit.org/docs/manual/Config.html#section_INTERPOLATE" target= =3D"_blank">http://template-toolkit.org/docs/manual/Config.html#section_INT= ERPOLATE</a><br></div><div class=3D"gmail_extra"><br clear=3D"all"><div><di= v><div dir=3D"ltr"><div><div dir=3D"ltr"><b style=3D"color:rgb(0,0,0);font-= family:Calibri,sans-serif;font-size:14px"><div><br></div><div style=3D"font= -family:Verdana,Helvetica,Arial;font-size:9pt">Lathan Bidwell</div></b></di= v></div></div></div></div><br><div class=3D"gmail_quote">On Mon, Mar 7, 201= 6 at 2:37 PM, Aaron Macks <span dir=3D"ltr"><<a href=3D"mailto:upelluri@= gmail.com" target=3D"_blank">[email protected]</a>></span> wrote:<br><b= lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px = #ccc solid;padding-left:1ex">I was trying to avoid having another file to m= anage, especially since<br> this is only used in a single place and only a single line of code.<br> <br> Aaron<br> <br> On 3/7/16 2:35 PM, Steven Cotton wrote:<br> > On 7 March 2016 at 19:12, Aaron Macks <<a href=3D"mailto:upelluri@g= mail.com" target=3D"_blank">[email protected]</a><br> <span>> <mailto:<a href=3D"mailto:[email protected]" target=3D"_blan= k">[email protected]</a>>> wrote:<br> ><br> >=C2=A0 =C2=A0 =C2=A0the problem is that TT tries to interpolate the $ a= nd it all gets<br> >=C2=A0 =C2=A0 =C2=A0messed up<br> ><br> ><br> </span>> WRAPPER blocks are processed. You could call INSERT at the end = of your<br> > wrapper, which will deliver the file as-is:<br> ><br> > <a href=3D"http://template-toolkit.org/docs/manual/Directives.html#sec= tion_INSERT" rel=3D"noreferrer" target=3D"_blank">http://template-toolkit.o= rg/docs/manual/Directives.html#section_INSERT</a><br> ><br> > Steve.<br> <div><div><br> --<br> _______________________________________________________<br> Aaron Macks(<a href=3D"mailto:[email protected]" target=3D"_blank">aaronm@w= iglaf.org</a>) [<a href=3D"http://www.wiglaf.org/~aaronm" rel=3D"noreferrer= " target=3D"_blank">http://www.wiglaf.org/~aaronm</a> ]<br> My sheep has seven gall bladders, that makes me the King of the Universe!<b= r> <br> _______________________________________________<br> templates mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">templat= [email protected]</a><br> <a href=3D"http://mail.template-toolkit.org/mailman/listinfo/templates" rel= =3D"noreferrer" target=3D"_blank">http://mail.template-toolkit.org/mailman/= listinfo/templates</a><br> </div></div></blockquote></div><br></div></div> </div></blockquote><blockquote type=3D"cite"><div><span>___________________= ____________________________</span><br><span>templates mailing list</span><= br><span><a href=3D"mailto:[email protected]" target=3D"_blank= ">[email protected]</a></span><br><span><a href=3D"http://mail= .template-toolkit.org/mailman/listinfo/templates" target=3D"_blank">http://= mail.template-toolkit.org/mailman/listinfo/templates</a></span><br></div></= blockquote></div></div></div><br>__________________________________________= _____<br> templates mailing list<br> <a href=3D"mailto:[email protected]">templates@template-toolki= t.org</a><br> <a href=3D"http://mail.template-toolkit.org/mailman/listinfo/templates" rel= =3D"noreferrer" target=3D"_blank">http://mail.template-toolkit.org/mailman/= listinfo/templates</a><br> <br></blockquote></div><br></div> --001a11444df04d6dc2052d7b8c6c-- --===============8946444458838828100== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates --===============8946444458838828100==--