Hello, this is a trivial question I guess. I find a lot of info to include a PROPERTY of a file into a page template. But I want to include the CONTENT of a file into this page template. -> what should be the format of the file that I want to include -> how do I make the include statement from my page template? Thanks a lot, Fanta _________________________________________________________________ MSN Photos est le moyen le plus simple de partager, modifier et imprimer vos photos préférées. http://photos.msn.fr/Support/WorldWide.aspx
Fanta Diallo wrote:
Hello, this is a trivial question I guess.
I find a lot of info to include a PROPERTY of a file into a page template. But I want to include the CONTENT of a file into this page template. -> what should be the format of the file that I want to include
I don't understand that question.
-> how do I make the include statement from my page template?
If you want to include a file from the filesystem write an external python script which returns you the content if the file, then <span tal:replace="python: yourFunction()"> if you want to include a file stored in zope: <span tal:replace="python: path2file.data"> Code was typed by mind, might contain errors. Hope that helps, thomas
I find a lot of info to include a PROPERTY of a file into a page template. But I want to include the CONTENT of a file into this page template. -> what should be the format of the file that I want to include -> how do I make the include statement from my page template?
Use the () method. I.e. content = context.myfileobject() If that's not the one, use context.myfileobject.read() Peter
participants (3)
-
Fanta Diallo -
Peter Bengtsson -
Thomas Guettler