Re: [Radiant] Changing page layout on-the-fly?

2009-07-27 Thread Mamed Mamedov
Hi everybody! Here how I have resolved my problem with changing page's layout on-the-fly:) I have created my own extension folder with my namespace-tags for unusual tasks. desc %{ Works like design switcher. } tag 'gsession:design' do |tag| design_type =

Re: [Radiant] Changing page layout on-the-fly?

2009-07-27 Thread Jim Gay
On Jul 27, 2009, at 2:24 PM, Mamed Mamedov wrote: Hi everybody! Here how I have resolved my problem with changing page's layout on- the-fly:) I have created my own extension folder with my namespace-tags for unusual tasks. desc %{ Works like design switcher. } tag 'gsession:design'

Re: [Radiant] Changing page layout on-the-fly?

2009-07-27 Thread Mamed Mamedov
No, I didn't disabled cache, but I'm using 'translator' extension which changes behaviour of radiant's caching subsystem. Here is my some changes to *translate_response_cache.rb*: ResponseCache.class_eval { # in here, we're just adding a two-letter language suffix to cached pages to make

Re: [Radiant] Changing page layout on-the-fly?

2009-07-27 Thread Jim Gay
On Jul 27, 2009, at 2:42 PM, Mamed Mamedov wrote: No, I didn't disabled cache, but I'm using 'translator' extension which changes behaviour of radiant's caching subsystem. Here is my some changes to *translate_response_cache.rb*: This won't work in 0.8.0. Rails 2.3 uses Rack::Cache and

Re: [Radiant] Changing page layout on-the-fly?

2009-07-27 Thread Mamed Mamedov
Yes, it is true. Therefore I'am using radiant v0.7.1 and rails2.1.2 for this site :) I have no time to do it better now ;( Regards, Mamed Mamedov Sent from Baku, Azerbaijan On Mon, Jul 27, 2009 at 11:51 PM, Jim Gay j...@saturnflyer.com wrote: On Jul 27, 2009, at 2:42 PM,

[Radiant] Changing page layout on-the-fly?

2009-07-16 Thread Mamed Mamedov
Hi everybody! I have a little question: how can I change page's layout from within my extension? Problem is, that I have 2 different page layouts for my site: [ full-version and light-version ]. I want to write a mini-extension to switch between designs of my site throw hitting: /design/set/full

Re: [Radiant] Changing page layout on-the-fly?

2009-07-16 Thread Petrik de Heus
On Jul 16, 2009, at 13:01 , Mamed Mamedov wrote: Hi everybody! I have a little question: how can I change page's layout from within my extension? Something like this: def activate Page.class_eval do def process_with_session_layout(request, response) self.layout =

Re: [Radiant] Changing page layout on-the-fly?

2009-07-16 Thread Sean Cribbs
If all of your pages have the same layout at any time, make sure all descendant pages have their layout set to inherit and then your extension could change the layout on the root page. However, it would not be trivial to do this on a per-user basis. Have you considered something like a