[Templates] How to get around max. variable length?

[prev] [thread] [next] [Date index for 2004/11/15]

From: Jason Peck
Subject: [Templates] How to get around max. variable length?
Date: 16:34 on 15 Nov 2004
Hello,

I hope someone can help me here. I put together a website using template
toolkit with the following simple structure. The aim of this structure
is to separate content from presentation (the web pages contain no
presentation, just content):

lib/std.ttl : Standard template for every webpage
[% FOREACH content = content_items %]
 [% content.title %]
 [% content.html %]
[% END %]


src/index.tt : A web page
[% INCLUDE std.ttl
  content_items = [
        {
          title => "Welcome",
          html =>   "
           Welcome to this webpage.
          "
        }
  ]
%]


However, it seems that template-toolkit seg faults if the any of the
variables in my index.tt file (like the html varaible) contain large
amounts of text (~25K in my case). Does anyone know a way around this
problem? Perhaps there is even a better way to structure this to avoid
the problem all together (i.e. not using variables somehow)? 

So far, I have tried setting INTERPOLATE 0 in the index.tt and also
tried using ' instead of " around my variables to no avail. 

If anyone could help I would be most grateful!


        -- 
        Jason Peck

Focus Robotics
http://www.focusrobotics.com


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] How to get around max. variable length?
Jason Peck 16:34 on 15 Nov 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52