Hi Sean,

Yes, this would solve the problem, but most extensions in my project
use @page.render and I did not want to go through them all to change
this...
What do you think about this as a general solution?

Manuel

On Mon, Nov 17, 2008 at 5:24 PM, Sean Cribbs <[EMAIL PROTECTED]> wrote:
> Manuel,
>
> Instead of render :text => @page.render, try @page.process(request,
> response); @performed_render = true.
>
> Sean
>
> Manuel Meurer wrote:
>>
>> Hi!
>>
>> I've had a problem reoccuring in a couple of extensions and was not
>> sure if it was a conceptual error on my side or if something was
>> lacking in Radiant's tag system. I solved this problem now and wanted
>> to share it to get some feedback from you guys.
>>
>> Take the 'url' tag from the standard tags for example. It tries to
>> access the request object through tag.globals.page.request.
>> Now this works fine if you render a page using the SiteController. But
>> when you have an extension that uses its own controller and renders
>> the page by calling 'render :text => @page.render',
>> tag.globals.page.request is nil.
>> I solved this problem by defining a filter in the
>> ApplicationController that sets @page by looking at params[:url] and
>> then sets @page.request (and @page.response). This way
>> tag.globals.page.request is always available, no matter if you use
>> your own controller or not.
>>
>> I hope this explanation was somewhat understandable.
>> Do you guys think this is a good idea or do you see any problems?
>>
>> Manuel
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to