On 21-10-2008 at 12:52:02 Maciej Łebkowski <[EMAIL PROTECTED]> wrote:
I don`t think it is possible. ;-) It relies too much on the user input.
For example, the content of the page (markdown syntax) can be
extended with some data from atom feed.
Reading of atom feeds doesn't sound like responsibility of templates.
But I dont know WHERE
to insert this data. The user could write something like:
User? Don't forget that PHPTAL allows use of PHP code, so you shouldn't
let users write TAL templates unless you trust them completely.
<tal:block tal:define="byebye php:exec('rm -rf /')">
This is paragraph
<tal:block metal:use-macro="atom/contents" tal:define="entry
-- this will be replaced with contents of main atom feed, second
And all of the above is *content*, insertet to the template using:
<tal:block tal:content="structure markdown: content" />
If you've got markdown parser that supports reading of atom feeds (?),
then just implement that entirely in markdown parser.
(i don`t know if they can be chained, but thats not a problem)
And in the modifier I have access to my data via $ctx object, right?
Sort-of. You shouldn't use $ctx directly. Use phptal_tale() instead (and
if you do, your expression will be chainable).
PHPTAL mailing list