More PRValueLink questions

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

More PRValueLink questions

LawsonEnglish
  How do I format text output from my custom link?

I can embed raw HTML by doing:

^PRVerbatim content: '<p>',myString1,'</p>', '<p>',myString2,'</p>'.

and so on. How can I use the   renderContentOn:    syntax so I can take
advantage of seaside's internal formatting methods... Or can I, or is
there something more pier-oriented I should do instead?

e.g.  +values:awgvalues|factorialval=300+ goes right of the edge of the
webpage currently.

Thanks,

Lawson
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: More PRValueLink questions

Lukas Renggli
Typically you return a PRDocument composite, as in your example with
PRVerbatim. Also you can return a string, or a collection of strings
or PRDocument items. If you return anything else, the default
#printOn: representation will be displayed.

If you are sure you only want to use the value link in the context of
Seaside you can even return a rendering block, something along ...

    ^ [ :html | html anchor callback: [ ... ]; with: 'some link' ]

Keep in mind that this will break if you try to convert your page to
Text, LaTeX, etc.

Lukas

On 2 October 2010 21:11, Lawson English <[hidden email]> wrote:

>  How do I format text output from my custom link?
>
> I can embed raw HTML by doing:
>
> ^PRVerbatim content: '<p>',myString1,'</p>', '<p>',myString2,'</p>'.
>
> and so on. How can I use the   renderContentOn:    syntax so I can take
> advantage of seaside's internal formatting methods... Or can I, or is there
> something more pier-oriented I should do instead?
>
> e.g.  +values:awgvalues|factorialval=300+ goes right of the edge of the
> webpage currently.
>
> Thanks,
>
> Lawson
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: More PRValueLink questions

LawsonEnglish
  Thanks very much.  Pier is amazingly powerful.

Lawson

On 10/2/10 12:22 PM, Lukas Renggli wrote:

> Typically you return a PRDocument composite, as in your example with
> PRVerbatim. Also you can return a string, or a collection of strings
> or PRDocument items. If you return anything else, the default
> #printOn: representation will be displayed.
>
> If you are sure you only want to use the value link in the context of
> Seaside you can even return a rendering block, something along ...
>
>      ^ [ :html | html anchor callback: [ ... ]; with: 'some link' ]
>
> Keep in mind that this will break if you try to convert your page to
> Text, LaTeX, etc.
>
> Lukas
>
> On 2 October 2010 21:11, Lawson English<[hidden email]>  wrote:
>>   How do I format text output from my custom link?
>>
>> I can embed raw HTML by doing:
>>
>> ^PRVerbatim content: '<p>',myString1,'</p>','<p>',myString2,'</p>'.
>>
>> and so on. How can I use the   renderContentOn:    syntax so I can take
>> advantage of seaside's internal formatting methods... Or can I, or is there
>> something more pier-oriented I should do instead?
>>
>> e.g.  +values:awgvalues|factorialval=300+ goes right of the edge of the
>> webpage currently.
>>
>> Thanks,
>>
>> Lawson
>> _______________________________________________
>> Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>
>
>

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki