Thanks, Uwe,
I will try that... I have so far never needed the ob nesting stuff or even known anything about it :) Some background information if you are interested :
I have a "CmsModule" framework that relies heavily on Smarty templates. To make things simple I am using the main template as a "controller" because the number of things to do is normally pretty limited. The URLS are of the type:
etc... and it is very easy to do the routing from the the template:
{if $action eq "products"} {cmsmodule name='products'}{/if}
and parse, run and return the rest of the stuff in the Smarty-loaded and initiated module - the extension and the class stuff does most of that automatically.
I have isolated the most common ajax calls to another template that I load when the url path start with "ajax_"
and that, of course is not a problem - I can ob_clean() and output the data.
Now I had a case where I needed to include another template in the middle of the chain when some parts of the page
have already been rendered and one tiny functionality needed some ajaxian output and cleaning the output buffer
(under certain rare circumstances).
That is where I stumbled upon the problem. An included template that loaded a class that in turn needed to clean the
output buffer simply to be able to echo "1" or "0" to the calling ajax routine.
So far no problems have arisen, the framework and its predecessors have been used in hundreds of web applications.
Yes, Smarty can be used as a controller as well :)
Anyhow, thanks for your input, I will learn and test the nesting stuff as soon as possible.
Markku