Hi,
On 19 Aug 2011, at 07:23, Lukas Renggli wrote:
Are you correctly implementing #children?
Yes. But, in this case, there are no children.
Also you make sure to use #continue:in:on: instead of
#visit: (that's
why you get the messed up HTML, your code writes to the wrong
renderer).
Thanks. That seems to solve the problem. I am using:
html rendererInstance withinContentDo: [ html rendererInstance continue: each document in:
self on: html ]
Cheers,
Doru
Have a look at PRDocument widget to see an example of
how to render
other structures within your widgets.
Lukas
On 19 August 2011 00:49, Tudor Girba <tudor(a)tudorgirba.com> wrote:
Hi,
I have a bit of trouble rendering a widget that aims to embed some other structures.
Here is the current code:
renderContentOn: html
html div
id: #cycler;
script: ((html jQuery: #cycler) cycle fx: 'fade'; timeout: self
timeout; delay: self delay; speed: self speed; pager: '#cyclerNav') greaseString;
with: [
self sourceChildren do: [:each |
html div class: 'cyclerItem'; with: [html
rendererInstance visit: each document] ] ].
It seems to work fine when sourceChildren contains only PRPages, but when there is a
PRFile inside, it goes strange. For example, if I have three PRFiles in the collection,
the rendering looks like:
<div id="cycler">
<div class="cyclerItem"></div>
<div class="cyclerItem"><img alt="One"
src="/pier?_s=Zp6phh68i9hRHhnB"></div>
<div class="cyclerItem"><img alt="Two"
src="/pier?_s=z2r2BcgQuxMPw_cc"></div>
</div>
<img alt="Three" src="/pier?_s=LFE6L8UkDNIyzAdN"></div>
What am I doing wrong?
Cheers,
Doru
--
www.tudorgirba.com
"Some battles are better lost than fought."
_______________________________________________
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
--
www.tudorgirba.com
"Yesterday is a fact.
Tomorrow is a possibility.
Today is a challenge."