> That said, I ask myself, where the real benefit is in nesting circuit.
> Initially I thought you use a nested circuit, if you want it's output being
> placed inside the output of the parent circuit. But given the example above,
> you can do the same by using separate output buffers an nesting them in the
> layout files.

It's up to you. You are certainly free to put the sidebar output into a 
variable (I would actually suggest putting it in the _request collection) and 
then showing that in the sidebar with a simple 'write raw' command. You'll want 
to use 'write raw' if the output has already been created by 'write' commands. 
So it would be something like this:

save output(_request{"sidebar"})
write("foo")
write("bar")
// etc.
end save output

// in sidebar
write raw(_request{"sidebar"})

This is needlessly complex and requires you to put this in every content 
circuit, so I wouldn't recommend it.

Or instead of doing this, an easier (and perhaps better) way is to "cheat" and 
put the code to generate the sidebar in files that are included from the 
layout, this creating your own pseudo-circuit, like this:

// in layout
include("/sidebar/qry_sidebar.a4d")
include("/sidebar/dsp_sidebar.a4d")

Nesting a circuit is useful if you have a different layout in the other circuit 
and the other circuit is a kind of plugin that the main page doesn't know 
anything about.

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to