[Zope3-Users] using tal to insert zwiki content

Jeff Shell eucci.group at gmail.com
Tue Jan 3 01:52:11 EST 2006


``context/wiki/About_Downwinders`` wouldn't (probably) know how to
render itself as HTML. In fact, you'd probably not want it to render
itself as HTML in its default since that would render the whole page.

To do this properly in Zope 3, you'd want to define a browser view to
render the ZWiki page for this context, and then go to
'context/wiki/About_Downwinders/@@your_view' in the ZPT code.

There are a lot of ways one can go from there. In Zope 3.2, a good
solution for pages made of parts where the content of the parts comes
from ZWiki pages, you could probably use viewlets.

In short - ZPT Pages are special. They're actually content (and view)
objects whose main job is to product HTML. ZWiki pages have the job of
managing and relating structured content. So you can't just include
them directly - you need to bring in a view object whose job is to
take that Wiki page content and turn it into HTML as appropriate for
how you want it to be rendered.

tal attributes are for inserting HTML. ZPT pages render HTML out by
default. Very few other built-in objects do that on their own without
views in Zope 3.

On 1/2/06, Brad Allen <brad at allendev.com> wrote:
>
> I had wanted to insert zwiki content into another page, in a way similar to
> the way ZPT pages can be inserted, but it doesn't seem to work. Is that
> a misuse of zwiki, and are tal attributes only for inserting ZPTs and
> nothing else?
>
> Here is what I was trying to do:
>
> <div id='bottomArticle' class="article" metal:fill-slot="bottomMiddleCol"
> tal:content="structure context/wiki/About_Downwinders"></div>
>
> ...where About_Downwinders was a zwiki object. I had wanted to use
> zwiki for some content pages that would be edited by site content authors,
> because zwiki offers easy wiki-style editing and notifications whenever
> a change is made.
>
> Thanks!
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>


More information about the Zope3-users mailing list