[Zope] Re: Using ReStructuredText instead of StructuredDocument inside ZPT

John Schinnerer johnschinnerer at yahoo.com
Sun Feb 26 16:34:22 EST 2006


Aloha,

Thanks for pointing me to that document, that's what I needed.

The example for TAL integration works just fine (with the typo fixed
:-), and also renders only the actual content, without adding the whole
XHTML document structure around it.

cheers,
John S.

> In your Zope distribution files look at 'doc/RESTRUCTUREDSTEXT.txt'
> (or 
> 'Zope/doc/RESTRUCTUREDSTEXT.txt' with Zope2.9).
> 
> It has examples of how to use ReST with different solutions.
> (There is a typo: 'restructured_test' should read 'restructured_text'
> )
> 
> Btw, the ZReST objects method 'source_txt' gets you the source text
> of 
> the reST document.
> 
> E.g. this should work in your example:
> 
> <p
>    tal:define="rest_txt 
> python:container.client_content.some_STX_object.source_txt()"
>    tal:replace="structure python: 
>
modules['Products.PythonScripts.standard'].restructured_text(rest_txt)"
> />
> 
> 
> Hth, Michael
> 
> -- 
> http://zope.org/Members/d2m
> http://planetzope.org
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Zope mailing list