From: "Randal L. Schwartz" <[email protected]>>>>>> "Octavian" == 
Octavian Râsnita <[email protected]> writes:

>> Well, as I said, I also agree, but I couldn't find that recommended
>> way. Can you tell me the solution for storing complex documents that
>> include text, lists, tables, headings which doesn't use HTML?

If you mean to store documents that must be delivered opaquely
as a giant unchanged blob, then yes, that's data.


Yes, this is what I want to store.


But if there's any templating structure in them, you are violating
model vs view, and that will bite you big time later.


The only template directive I want to use is one that would make the data 
really unchangeable.

I mean, if I would hard-code the html links, I would need to change all the 
pages that contain links in case I would need to change the structure of the 
site (for example run the web app in a virtual sub-directory than /).

So I want to define the links as
<a href="[% c.uri_for('/the/url') %]">The link label</a>

But I don't need to use other templating structure elements like FOR, 
FOREACH, IF, ELSE, WHILE, BLOCK, MACRO, PROCESS, INCLUDE...

Anyway, this discussion was helpful because I found how to evaluate the TT 
code from a variable and I also found that I might need to use another 
formatting code like Textile, Markdown, BBCode for other reasons.

Thank you all for your help.

Octavian


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to