Re: [Radiant] Paperclipped assets bucket not showing
Hi! Have you installed/updated any extensions after paperclipped worked fine? Or may be you edited your extensions? May be you updated your radiant installation? Regards, Mamed Mamedov Ogden Nash http://www.brainyquote.com/quotes/authors/o/ogden_nash.html - The trouble with a kitten is that when it grows up, it's always a cat. On Mon, Jul 27, 2009 at 10:58 AM, dav...@ourpatch.com.au wrote: I have a small problem with the paperclipped extension on a live site. Clicking on the 'Show Assets Bucket' link doesn't do anything in Firefox or IE7. However it does appear in Chrome (and I'm assuming Safari). Any ideas what's going on here - possibly a conflict with another extension? This was definitely working properly when first installed. Cheers, Dave ___ 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
Re: [Radiant] Paperclipped assets bucket not showing
We've definitely added more extensions since Paperclipped was first installed. I was hoping someone else out there had a similar problem so I could narrow down the issue. -Original Message- From: Mamed Mamedov mamed.mame...@gmail.com Sent: Monday, 27 July, 2009 4:47pm To: radiant@radiantcms.org Subject: Re: [Radiant] Paperclipped assets bucket not showing Hi! Have you installed/updated any extensions after paperclipped worked fine? Or may be you edited your extensions? May be you updated your radiant installation? Regards, Mamed Mamedov Ogden Nash http://www.brainyquote.com/quotes/authors/o/ogden_nash.html - The trouble with a kitten is that when it grows up, it's always a cat. On Mon, Jul 27, 2009 at 10:58 AM, dav...@ourpatch.com.au wrote: I have a small problem with the paperclipped extension on a live site. Clicking on the 'Show Assets Bucket' link doesn't do anything in Firefox or IE7. However it does appear in Chrome (and I'm assuming Safari). Any ideas what's going on here - possibly a conflict with another extension? This was definitely working properly when first installed. Cheers, Dave ___ 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
Re: [Radiant] Paperclipped assets bucket not showing
What extensions do you have that add Javascript to the interface? Have you looked at any console errors in something like FireBug? On Jul 27, 2009, at 3:03 AM, dav...@ourpatch.com.au wrote: We've definitely added more extensions since Paperclipped was first installed. I was hoping someone else out there had a similar problem so I could narrow down the issue. -Original Message- From: Mamed Mamedov mamed.mame...@gmail.com Sent: Monday, 27 July, 2009 4:47pm To: radiant@radiantcms.org Subject: Re: [Radiant] Paperclipped assets bucket not showing Hi! Have you installed/updated any extensions after paperclipped worked fine? Or may be you edited your extensions? May be you updated your radiant installation? Regards, Mamed Mamedov Ogden Nash http://www.brainyquote.com/quotes/authors/o/ogden_nash.html - The trouble with a kitten is that when it grows up, it's always a cat. On Mon, Jul 27, 2009 at 10:58 AM, dav...@ourpatch.com.au wrote: I have a small problem with the paperclipped extension on a live site. Clicking on the 'Show Assets Bucket' link doesn't do anything in Firefox or IE7. However it does appear in Chrome (and I'm assuming Safari). Any ideas what's going on here - possibly a conflict with another extension? This was definitely working properly when first installed. Cheers, Dave ___ 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 ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Weird behaviour always displaying the same page
Unless it was you who asked originally, I have heard of this problem before. It has to do with FCGI if I recall correctly. Rack::Cache reads the request url as /dispatch.fcgi? and thus thinks every request is the same page. Jan De Poorter made a Rack middleware that fixes this problem: http://workswithruby.com/2009/7/rack-cache-and-lighttpd-fcgi Sean Tassilo Philipp wrote: Hi, I'm new to radiant and ran into a strange problem I didn't manage to figure out. I ran radiant 0.8.0 on a simple local testbox and that worked flawlessly, using sqlite3 and lighttpd. After playing around with radiant and getting used to it, I wanted to start working on a site hosted on bluehost (unfortunately, I can't change the hosting service). Well, I installed the required gems, or updated old gems, followed the install on bluehost guide on the wiki, set up the roasters sample page, and made it finally work... sort of. After browsing to a page of the sample page, e.g. 'news', every single request returns this 'news' page, regardless of the URL. So, trying to access 'locations', returns the 'news' page, too, etc. However, a couple of minutes later it works, but then, every request displays the 'locations' page, etc. I think it might be related to the page caching, because the radiantcms website states that radiant uses a 5 minute caching system, but I'm not quite sure about that. Any ideas? As a sidenote - in order to get it running I had to patch gems/rackrack-1.0.0/lib/rack/handler/fastcgi.rb as outlined in http://www.ruby-forum.com/topic/191484 - but this shouldn't cause the issues I'm having, though. These are the installed gem versions: RedCloth-4.2.2 actionmailer-2.3.3 actionpack-2.3.3 activerecord-2.3.3 activeresource-2.3.3 activesupport-2.3.3 cgi_multipart_eof_fix-2.5.0 daemons-1.0.10 fastthread-1.0.7 fcgi-0.8.7 gem_plugin-0.2.3 mongrel-1.1.5 rack-1.0.0 radiant-0.8.0 rails-2.3.3 rake-0.8.7 rmagick-2.10.0 rspec-1.2.8 sqlite3-ruby-1.2.5 Thanks! Tassilo ___ 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
Re: [Radiant] Weird behaviour always displaying the same page
Hi, thanks for the quick reply! Tonight, I'll give it a try and let you know how it went. Tassilo On Mon, 27 Jul 2009 09:21:11 -0400 Sean Cribbs seancri...@gmail.com wrote: Unless it was you who asked originally, I have heard of this problem before. It has to do with FCGI if I recall correctly. Rack::Cache reads the request url as /dispatch.fcgi? and thus thinks every request is the same page. Jan De Poorter made a Rack middleware that fixes this problem: http://workswithruby.com/2009/7/rack-cache-and-lighttpd-fcgi Sean Tassilo Philipp wrote: Hi, I'm new to radiant and ran into a strange problem I didn't manage to figure out. I ran radiant 0.8.0 on a simple local testbox and that worked flawlessly, using sqlite3 and lighttpd. After playing around with radiant and getting used to it, I wanted to start working on a site hosted on bluehost (unfortunately, I can't change the hosting service). Well, I installed the required gems, or updated old gems, followed the install on bluehost guide on the wiki, set up the roasters sample page, and made it finally work... sort of. After browsing to a page of the sample page, e.g. 'news', every single request returns this 'news' page, regardless of the URL. So, trying to access 'locations', returns the 'news' page, too, etc. However, a couple of minutes later it works, but then, every request displays the 'locations' page, etc. I think it might be related to the page caching, because the radiantcms website states that radiant uses a 5 minute caching system, but I'm not quite sure about that. Any ideas? As a sidenote - in order to get it running I had to patch gems/rackrack-1.0.0/lib/rack/handler/fastcgi.rb as outlined in http://www.ruby-forum.com/topic/191484 - but this shouldn't cause the issues I'm having, though. These are the installed gem versions: RedCloth-4.2.2 actionmailer-2.3.3 actionpack-2.3.3 activerecord-2.3.3 activeresource-2.3.3 activesupport-2.3.3 cgi_multipart_eof_fix-2.5.0 daemons-1.0.10 fastthread-1.0.7 fcgi-0.8.7 gem_plugin-0.2.3 mongrel-1.1.5 rack-1.0.0 radiant-0.8.0 rails-2.3.3 rake-0.8.7 rmagick-2.10.0 rspec-1.2.8 sqlite3-ruby-1.2.5 Thanks! Tassilo ___ 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
Re: [Radiant] Changing page layout on-the-fly?
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 = request.session[gsession_design] if design_type == nil design_type = GenieSessionExtension.defaults[:design] request.session[gsession_design] = design_type end design_type.strip! if layout = Layout.find_by_name(tag.attr[#{design_type}]) tag.globals.page.layout = layout tag.globals.page.render end end Usage: I have created layout named master-index with only one line in it: r:gsession:design full=full-index light=light-index / With 2 arguments, which describes layout names for 'full' and 'light' version of my site. You can define 'gsession_*design*' session variable at any time by hitting, for example:* /genie/set/design/light* All my pages have selected 'master-index' layout. That is all, while page is rendered my tag switches current layout to 'full-index' or 'light-index' named layouts. Waiting for comments ... Thank you:) Regards, Mamed Mamedov On Thu, Jul 16, 2009 at 6:16 PM, Sean Cribbs seancri...@gmail.com wrote: 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 combination of Javascript and CSS that lets your users switch layouts? Sean Mamed Mamedov wrote: 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 and /design/set/light or /design/reset And I'am saving current design variable in current user's session. And now, just need to change current page's layout on the fly accordingly to session value. Regards, Mamed Mamedov ___ 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
Re: [Radiant] Changing page layout on-the-fly?
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' do |tag| design_type = request.session[gsession_design] if design_type == nil design_type = GenieSessionExtension.defaults[:design] request.session[gsession_design] = design_type end design_type.strip! if layout = Layout.find_by_name(tag.attr[#{design_type}]) tag.globals.page.layout = layout tag.globals.page.render end end Usage: I have created layout named master-index with only one line in it: r:gsession:design full=full-index light=light-index / With 2 arguments, which describes layout names for 'full' and 'light' version of my site. You can define 'gsession_*design*' session variable at any time by hitting, for example:* /genie/set/design/light* All my pages have selected 'master-index' layout. That is all, while page is rendered my tag switches current layout to 'full-index' or 'light-index' named layouts. Waiting for comments ... Thank you:) Have you disabled caching to do this? Regards, Mamed Mamedov On Thu, Jul 16, 2009 at 6:16 PM, Sean Cribbs seancri...@gmail.com wrote: 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 combination of Javascript and CSS that lets your users switch layouts? Sean Mamed Mamedov wrote: 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 and /design/set/light or /design/reset And I'am saving current design variable in current user's session. And now, just need to change current page's layout on the fly accordingly to session value. Regards, Mamed Mamedov ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Changing page layout on-the-fly?
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 sure that the wrong # language doesn't get served up because it has been cached inappropriately. we could change this to # cache in a separate directory (i.e. en/), but for now, we're just adding the extension private def translator_path(path) #path =~ /\.css|\.js$/ ? path : kk_request.suffixize(kk_request.language) path =~ /\.css|\.js$/ ? path : [ path, kk_request.session[gsession_color], kk_request.session[gsession_design], kk_request.suffixize(kk_request.language) ].join( _ ) end As a result I have this files in my cache folder: selene# ll total 28 drwxrwxrwx 2 root www512 Jul 27 23:22 _css -rw-rw-rw- 1 root www 22972 Jul 27 23:22 index_blue_full__az-AZ.data -rw-rw-rw- 1 root www185 Jul 27 23:22 index_blue_full__az-AZ.yml For example, if user requests 'red' 'full' version of site, then *'index_red_full__az-AZ' *will be requested. If there is no cached file, then page will be generated by radiant from db and then cached in this folder. That is solution, I think. I'am using radiant v0.7.1. My site supports many colors (design types) languages and light/full-version. Regards, Mamed Mamedov Sent from Baku, Azerbaijan On Mon, Jul 27, 2009 at 11:27 PM, Jim Gay j...@saturnflyer.com wrote: 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' do |tag| design_type = request.session[gsession_design] if design_type == nil design_type = GenieSessionExtension.defaults[:design] request.session[gsession_design] = design_type end design_type.strip! if layout = Layout.find_by_name(tag.attr[#{design_type}]) tag.globals.page.layout = layout tag.globals.page.render end end Usage: I have created layout named master-index with only one line in it: r:gsession:design full=full-index light=light-index / With 2 arguments, which describes layout names for 'full' and 'light' version of my site. You can define 'gsession_*design*' session variable at any time by hitting, for example:* /genie/set/design/light* All my pages have selected 'master-index' layout. That is all, while page is rendered my tag switches current layout to 'full-index' or 'light-index' named layouts. Waiting for comments ... Thank you:) Have you disabled caching to do this? Regards, Mamed Mamedov On Thu, Jul 16, 2009 at 6:16 PM, Sean Cribbs seancri...@gmail.com wrote: 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 combination of Javascript and CSS that lets your users switch layouts? Sean Mamed Mamedov wrote: 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 and /design/set/light or /design/reset And I'am saving current design variable in current user's session. And now, just need to change current page's layout on the fly accordingly to session value. Regards, Mamed Mamedov ___ 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
Re: [Radiant] Changing page layout on-the-fly?
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 Radiant 0.8.0 packages Rails 2.3.2 ResponseCache functions were moved to Radiant::Cache, a subclass of Rack::Cache ResponseCache.class_eval { # in here, we're just adding a two-letter language suffix to cached pages to make sure that the wrong # language doesn't get served up because it has been cached inappropriately. we could change this to # cache in a separate directory (i.e. en/), but for now, we're just adding the extension private def translator_path(path) #path =~ /\.css|\.js$/ ? path : kk_request.suffixize(kk_request.language) path =~ /\.css|\.js$/ ? path : [ path, kk_request.session[gsession_color], kk_request.session[gsession_design], kk_request.suffixize(kk_request.language) ].join( _ ) end As a result I have this files in my cache folder: selene# ll total 28 drwxrwxrwx 2 root www512 Jul 27 23:22 _css -rw-rw-rw- 1 root www 22972 Jul 27 23:22 index_blue_full__az- AZ.data -rw-rw-rw- 1 root www185 Jul 27 23:22 index_blue_full__az-AZ.yml For example, if user requests 'red' 'full' version of site, then *'index_red_full__az-AZ' *will be requested. If there is no cached file, then page will be generated by radiant from db and then cached in this folder. That is solution, I think. I'am using radiant v0.7.1. My site supports many colors (design types) languages and light/full-version. Regards, Mamed Mamedov Sent from Baku, Azerbaijan On Mon, Jul 27, 2009 at 11:27 PM, Jim Gay j...@saturnflyer.com wrote: 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' do |tag| design_type = request.session[gsession_design] if design_type == nil design_type = GenieSessionExtension.defaults[:design] request.session[gsession_design] = design_type end design_type.strip! if layout = Layout.find_by_name(tag.attr[#{design_type}]) tag.globals.page.layout = layout tag.globals.page.render end end Usage: I have created layout named master-index with only one line in it: r:gsession:design full=full-index light=light-index / With 2 arguments, which describes layout names for 'full' and 'light' version of my site. You can define 'gsession_*design*' session variable at any time by hitting, for example:* /genie/set/design/light* All my pages have selected 'master-index' layout. That is all, while page is rendered my tag switches current layout to 'full-index' or 'light-index' named layouts. Waiting for comments ... Thank you:) Have you disabled caching to do this? Regards, Mamed Mamedov On Thu, Jul 16, 2009 at 6:16 PM, Sean Cribbs seancri...@gmail.com wrote: 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 combination of Javascript and CSS that lets your users switch layouts? Sean Mamed Mamedov wrote: 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 and /design/set/light or /design/reset And I'am saving current design variable in current user's session. And now, just need to change current page's layout on the fly accordingly to session value. Regards, Mamed Mamedov ___ 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
Re: [Radiant] Changing page layout on-the-fly?
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, 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 Radiant 0.8.0 packages Rails 2.3.2 ResponseCache functions were moved to Radiant::Cache, a subclass of Rack::Cache ResponseCache.class_eval { # in here, we're just adding a two-letter language suffix to cached pages to make sure that the wrong # language doesn't get served up because it has been cached inappropriately. we could change this to # cache in a separate directory (i.e. en/), but for now, we're just adding the extension private def translator_path(path) #path =~ /\.css|\.js$/ ? path : kk_request.suffixize(kk_request.language) path =~ /\.css|\.js$/ ? path : [ path, kk_request.session[gsession_color], kk_request.session[gsession_design], kk_request.suffixize(kk_request.language) ].join( _ ) end As a result I have this files in my cache folder: selene# ll total 28 drwxrwxrwx 2 root www512 Jul 27 23:22 _css -rw-rw-rw- 1 root www 22972 Jul 27 23:22 index_blue_full__az-AZ.data -rw-rw-rw- 1 root www185 Jul 27 23:22 index_blue_full__az-AZ.yml For example, if user requests 'red' 'full' version of site, then *'index_red_full__az-AZ' *will be requested. If there is no cached file, then page will be generated by radiant from db and then cached in this folder. That is solution, I think. I'am using radiant v0.7.1. My site supports many colors (design types) languages and light/full-version. Regards, Mamed Mamedov Sent from Baku, Azerbaijan On Mon, Jul 27, 2009 at 11:27 PM, Jim Gay j...@saturnflyer.com wrote: 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' do |tag| design_type = request.session[gsession_design] if design_type == nil design_type = GenieSessionExtension.defaults[:design] request.session[gsession_design] = design_type end design_type.strip! if layout = Layout.find_by_name(tag.attr[#{design_type}]) tag.globals.page.layout = layout tag.globals.page.render end end Usage: I have created layout named master-index with only one line in it: r:gsession:design full=full-index light=light-index / With 2 arguments, which describes layout names for 'full' and 'light' version of my site. You can define 'gsession_*design*' session variable at any time by hitting, for example:* /genie/set/design/light* All my pages have selected 'master-index' layout. That is all, while page is rendered my tag switches current layout to 'full-index' or 'light-index' named layouts. Waiting for comments ... Thank you:) Have you disabled caching to do this? Regards, Mamed Mamedov On Thu, Jul 16, 2009 at 6:16 PM, Sean Cribbs seancri...@gmail.com wrote: 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 combination of Javascript and CSS that lets your users switch layouts? Sean Mamed Mamedov wrote: 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 and /design/set/light or /design/reset And I'am saving current design variable in current user's session. And now, just need to change current page's layout on the fly accordingly to session value. Regards, Mamed Mamedov ___ 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:
[Radiant] Extension Registry
I was just looking through available extensions at http://ext.radiantcms.org/ . Is it ordered by the order it was registered? I think there could be a more helpful order. Steven ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Max page cache time
Hi! I'am using radiant v0.7.1 and I want to cache my pages for 12 hours, against default 5 minutes value. How can I do it? Thank you! Regards, Mamed Mamedov Sent from Baku, Azerbaijan ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Max page cache time
In the config.after_initialize block in environment.rb, add: ResponseCache.defaults[:expire_time] = 12.hours You can also check out the page_options extension, which enables you to set non-default caching on a per page basis. http://ext.radiantcms.org/extensions/123-page-options Andrew On Jul 27, 2009, at 2:06 PM, Mamed Mamedov wrote: Hi! I'am using radiant v0.7.1 and I want to cache my pages for 12 hours, against default 5 minutes value. How can I do it? Thank you! Regards, Mamed Mamedov Sent from Baku, Azerbaijan ___ 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
Re: [Radiant] Weird behaviour always displaying the same page
Hi, awesome, it worked beautifully! Thanks for pointing out that article. Since bluehost runs apache, the fix doesn't seem to be lighttpd specific. Thanks again, and thanks for working on radiant - I think this might quickly become my favorite CMS. Super-flexible, very straightforward, and yes, it just doesn't block you in doing things compared to pretty much every other popular CMS out there that requires you to stick to some basic layout, etc.. Keep up the good work! Thanks, Tassilo On Mon, 27 Jul 2009 09:21:11 -0400 Sean Cribbs seancri...@gmail.com wrote: Unless it was you who asked originally, I have heard of this problem before. It has to do with FCGI if I recall correctly. Rack::Cache reads the request url as /dispatch.fcgi? and thus thinks every request is the same page. Jan De Poorter made a Rack middleware that fixes this problem: http://workswithruby.com/2009/7/rack-cache-and-lighttpd-fcgi Sean Tassilo Philipp wrote: Hi, I'm new to radiant and ran into a strange problem I didn't manage to figure out. I ran radiant 0.8.0 on a simple local testbox and that worked flawlessly, using sqlite3 and lighttpd. After playing around with radiant and getting used to it, I wanted to start working on a site hosted on bluehost (unfortunately, I can't change the hosting service). Well, I installed the required gems, or updated old gems, followed the install on bluehost guide on the wiki, set up the roasters sample page, and made it finally work... sort of. After browsing to a page of the sample page, e.g. 'news', every single request returns this 'news' page, regardless of the URL. So, trying to access 'locations', returns the 'news' page, too, etc. However, a couple of minutes later it works, but then, every request displays the 'locations' page, etc. I think it might be related to the page caching, because the radiantcms website states that radiant uses a 5 minute caching system, but I'm not quite sure about that. Any ideas? As a sidenote - in order to get it running I had to patch gems/rackrack-1.0.0/lib/rack/handler/fastcgi.rb as outlined in http://www.ruby-forum.com/topic/191484 - but this shouldn't cause the issues I'm having, though. These are the installed gem versions: RedCloth-4.2.2 actionmailer-2.3.3 actionpack-2.3.3 activerecord-2.3.3 activeresource-2.3.3 activesupport-2.3.3 cgi_multipart_eof_fix-2.5.0 daemons-1.0.10 fastthread-1.0.7 fcgi-0.8.7 gem_plugin-0.2.3 mongrel-1.1.5 rack-1.0.0 radiant-0.8.0 rails-2.3.3 rake-0.8.7 rmagick-2.10.0 rspec-1.2.8 sqlite3-ruby-1.2.5 Thanks! Tassilo ___ 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