Re: [Templates] "ignore" a section

2016-03-07 Thread Lathan Bidwell
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  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?
>
> 

Re: [Templates] "ignore" a section

2016-03-07 Thread Richard Thomas
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?


Re: [Templates] "ignore" a section

2016-03-07 Thread Lathan Bidwell
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  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  > > 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(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the Universe!
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] "ignore" a section

2016-03-07 Thread Sherwood Botsford
Does the \ escape mechanism work in this situation  ?

Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
Online Inventory
https://docs.google.com/spreadsheets/d/10u28L2gCe6wSdAZWwXRMZKi90M7dNYQrCcyE_QWEOZw/edit?usp=sharing
O: 780-848-2548 C:780-863-7311
50042 Range Rd 31
Warburg, Alberta T0C 2T0


On 7 March 2016 at 12:37, Aaron Macks  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  > > 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(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the Universe!
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] "ignore" a section

2016-03-07 Thread Aaron Macks
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  > 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(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
My sheep has seven gall bladders, that makes me the King of the Universe!

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] "ignore" a section

2016-03-07 Thread Aaron Macks
the current issue is around a line of jQuery code that foundation needs
to run at the end of every page.  I've got a wrapper file that I import
with WRAPPER block, and I want the last line emitted, just before the
 to be
$(document).foundation()

the problem is that TT tries to interpolate the $ and it all gets messed up

Aaron

On 3/7/16 9:01 AM, Ronald Kimball wrote:
> This is probably something simple.  What does your template look like
> right now?
> 
> On Sun, Mar 6, 2016 at 4:50 PM, Aaron Macks  > wrote:
> 
> I've got to add some javascript into a template, and the $ in the js
> code is getting interpolated incorrectly.  How do I disable
> interpolation for a block of code, or simply tell TT, "just print this
> code unprocessed"?
> 
> Thanks
> Aaron
> --
> ___
> Aaron Macks(aar...@wiglaf.org )
> [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the
> Universe!
> 
> ___
> templates mailing list
> templates@template-toolkit.org 
> http://mail.template-toolkit.org/mailman/listinfo/templates
> 
> 
> 
> 
> -- 
> *Ronald J Kimball*
> Senior Developer
>  - www.snapapp.com  | Facebook
>  *|* Twitter
> 

-- 
___
Aaron Macks(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
My sheep has seven gall bladders, that makes me the King of the Universe!

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] "ignore" a section

2016-03-07 Thread Ronald Kimball
This is probably something simple.  What does your template look like right
now?

On Sun, Mar 6, 2016 at 4:50 PM, Aaron Macks  wrote:

> I've got to add some javascript into a template, and the $ in the js
> code is getting interpolated incorrectly.  How do I disable
> interpolation for a block of code, or simply tell TT, "just print this
> code unprocessed"?
>
> Thanks
> Aaron
> --
> ___
> Aaron Macks(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the Universe!
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>



-- 
*Ronald J Kimball*
Senior Developer
 - www.snapapp.com | Facebook  *|* Twitter

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] "ignore" a section

2016-03-06 Thread Sherwood Botsford
Keep it in a separate file and INCLUDE it?

This also separates functions:  Templates are for layout.  Markdown or
whatever for content.  .js files for javascript.

Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
Online Inventory
https://docs.google.com/spreadsheets/d/10u28L2gCe6wSdAZWwXRMZKi90M7dNYQrCcyE_QWEOZw/edit?usp=sharing
O: 780-848-2548 C:780-863-7311
50042 Range Rd 31
Warburg, Alberta T0C 2T0


On 6 March 2016 at 15:50, Aaron Macks  wrote:

> I've got to add some javascript into a template, and the $ in the js
> code is getting interpolated incorrectly.  How do I disable
> interpolation for a block of code, or simply tell TT, "just print this
> code unprocessed"?
>
> Thanks
> Aaron
> --
> ___
> Aaron Macks(aar...@wiglaf.org) [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the Universe!
>
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates