Re: [Seaside] seaside: interpreting pier syntax.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] seaside: interpreting pier syntax.

Lukas Renggli
> my problem now is getting at that PRDocument to parse out as pier/html.
>
> i was tried the PRDocument text function, but this did not produce pier/html..

#text answers a plain text representation.

To get HTML output you can try with a PRViewRenderer instance, however
it is very much targeted at Pier. So very likely it won't work well
for links, etc.

   renderContentOn: html
      viewRenderer := PRViewRenderer new.
      viewRenderer withinContentDo: [ viewRenderer start: document in:
self on: html ]

If you have your own Seaside application outside Pier, you probably
want to create your own PRVisitor subclass that displays the document
tree exactly the way you want.

If you are within a Pier application already you can use a simpler version:

   renderConentOn: html
      html rendererInstance continue: document in: self on: html

Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki