Re: "ignore" a section
Richard Thomas <[email protected]> Tue, 08 Mar 2016 07:19:47 +1100
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
--===============6663783947587545672==
Content-type: multipart/alternative;
boundary=Apple-Mail-B4A6376A-10BB-468E-B9FC-A4497D29F55D
Content-transfer-encoding: 7bit
--Apple-Mail-B4A6376A-10BB-468E-B9FC-A4497D29F55D
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: quoted-printable
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:
>=20
> You could stop using $'s outside of TT tags, and turn off the Interpolate c=
onfiguration:
>=20
> http://template-toolkit.org/docs/manual/Config.html#section_INTERPOLATE
>=20
>=20
> Lathan Bidwell
>=20
>> 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.
>>=20
>> Aaron
>>=20
>> 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.
>>=20
>> --
>> _______________________________________________________
>> Aaron Macks([email protected]) [http://www.wiglaf.org/~aaronm ]
>> My sheep has seven gall bladders, that makes me the King of the Universe!=
>>=20
>> _______________________________________________
>> templates mailing list
>> [email protected]
>> http://mail.template-toolkit.org/mailman/listinfo/templates
>=20
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
--Apple-Mail-B4A6376A-10BB-468E-B9FC-A4497D29F55D
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div>That's why I avoid using the INTERPOLA=
TE configuration option, to be honest. But once you have code everywhere tha=
t uses it, it's difficult to remove.</div><div id=3D"AppleMailSignature"><br=
></div><div id=3D"AppleMailSignature">Is the reverse an option? eg place the=
line in regular tags and single-quote to avoid interpolation by TT?</div><d=
iv id=3D"AppleMailSignature"><br></div><div id=3D"AppleMailSignature"><sc=
ript>[% '$(document)' %].ready({...</div><div id=3D"AppleMailSignature"><=
br></div><div id=3D"AppleMailSignature">cheers</div><div id=3D"AppleMailSign=
ature">RET</div><div id=3D"AppleMailSignature"><br>Sent from my iPad</div><d=
iv><br>On 8 Mar 2016, at 6:58 AM, Lathan Bidwell <<a href=3D"mailto:latha=
[email protected]">[email protected]</a>> wrote:<br><br></div><blockquote ty=
pe=3D"cite"><div><div dir=3D"ltr">You could stop using $'s outside of TT tag=
s, and turn off the Interpolate configuration:<div><br></div><div><a href=3D=
"http://template-toolkit.org/docs/manual/Config.html#section_INTERPOLATE">ht=
tp://template-toolkit.org/docs/manual/Config.html#section_INTERPOLATE</a><br=
></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:Calibri,sans-serif;font-size:14px"><div><br></div><div style=
=3D"font-family:Verdana,Helvetica,Arial;font-size:9pt">Lathan Bidwell</div><=
/b></div></div></div></div></div><br><div class=3D"gmail_quote">On Mon, Mar 7=
, 2016 at 2:37 PM, Aaron Macks <span dir=3D"ltr"><<a href=3D"mailto:upell=
[email protected]" target=3D"_blank">[email protected]</a>></span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #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@gm=
ail.com">[email protected]</a><br>
<span class=3D"">> <mailto:<a href=3D"mailto:[email protected]">upell=
[email protected]</a>>> wrote:<br>
><br>
> the problem is that TT tries to interpolate the $ an=
d it all gets<br>
> messed up<br>
><br>
><br>
</span>> WRAPPER blocks are processed. You could call INSERT at the end o=
f your<br>
> wrapper, which will deliver the file as-is:<br>
><br>
> <a href=3D"http://template-toolkit.org/docs/manual/Directives.html#sect=
ion_INSERT" rel=3D"noreferrer" target=3D"_blank">http://template-toolkit.org=
/docs/manual/Directives.html#section_INSERT</a><br>
><br>
> Steve.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
_______________________________________________________<br>
Aaron Macks(<a href=3D"mailto:[email protected]">[email protected]</a>) [<a h=
ref=3D"http://www.wiglaf.org/~aaronm" rel=3D"noreferrer" target=3D"_blank">h=
ttp://www.wiglaf.org/~aaronm</a> ]<br>
My sheep has seven gall bladders, that makes me the King of the Universe!<br=
>
<br>
_______________________________________________<br>
templates mailing list<br>
<a href=3D"mailto:[email protected]">templates@template-toolkit=
.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/list=
info/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]">templates@template-=
toolkit.org</a></span><br><span><a href=3D"http://mail.template-toolkit.org/=
mailman/listinfo/templates">http://mail.template-toolkit.org/mailman/listinf=
o/templates</a></span><br></div></blockquote></body></html>=
--Apple-Mail-B4A6376A-10BB-468E-B9FC-A4497D29F55D--
--===============6663783947587545672==
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
--===============6663783947587545672==--