Hello list, I wonder how you guys handle content pages? Often described as "static" pages. However, I don''t like to call them "static" because these pages often do use some minor dynamic content. This is what I like to think of as the "website" part of the web application. Content that does not have complex logic behind it. I had to handle it in the past, and at the time I just created a pages controller and each action would be a "page". I would then create custom routes as alias to each page, such as: map.connect "about-us", :controller => "pages", :action => "about_us" However, this new application has many more pages, and with rather complex hierarchies, for example: site.com/sales-solutions/fast-foods/photo-gallery (photo-gallery is exclusive, static, content-only sub-section of fast-foods and has nothing to do with a photo-gallery application other than advertising this service) I''m not sure on how I could best handle situations like this. Maybe Rails has a CMS plugin or something that helps in managing static pages? If you ever had to deal with a situation like this, please, share your experience and thoughts! Any hints greatly appreciated! Thanks, Marcelo. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Marcelo de Moraes Serpa wrote:> Hello list, > > I wonder how you guys handle content pages? Often described as > "static" pages. > > However, I don''t like to call them "static" because these pages often > do use some minor dynamic content. > > This is what I like to think of as the "website" part of the web > application. Content that does not have complex logic behind it. > > I had to handle it in the past, and at the time I just created a pages > controller and each action would be a "page". I would then create > custom routes as alias to each page, such as: > > map.connect "about-us", :controller => "pages", :action => "about_us" > > However, this new application has many more pages, and with rather > complex hierarchies, for example: > > site.com/sales-solutions/fast-foods/photo-gallery > <http://site.com/sales-solutions/fast-foods/photo-gallery> > > (photo-gallery is exclusive, static, content-only sub-section of > fast-foods and has nothing to do with a photo-gallery application > other than advertising this service) > > I''m not sure on how I could best handle situations like this. Maybe > Rails has a CMS plugin or something that helps in managing static pages? > > If you ever had to deal with a situation like this, please, share your > experience and thoughts! > > Any hints greatly appreciated! > > Thanks, > > Marcelo.I use Radiant CMS. I haven''t yet needed to marry it with a Rails application but I believe it can be done - there are a couple of extensions for Radiant that support it. Cheers, Mohit. 6/23/2008 | 12:47 AM. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Mohit, I will definitely try Radiant, But, I wonder, how do you handle the pages issues in your Rails applications? Cheers, Marcelo. On Sun, Jun 22, 2008 at 1:48 PM, Mohit Sindhwani <mo_mail-RxrYI66vbj0AvxtiuMwx3w@public.gmane.org> wrote:> > Marcelo de Moraes Serpa wrote: > > Hello list, > > > > I wonder how you guys handle content pages? Often described as > > "static" pages. > > > > However, I don''t like to call them "static" because these pages often > > do use some minor dynamic content. > > > > This is what I like to think of as the "website" part of the web > > application. Content that does not have complex logic behind it. > > > > I had to handle it in the past, and at the time I just created a pages > > controller and each action would be a "page". I would then create > > custom routes as alias to each page, such as: > > > > map.connect "about-us", :controller => "pages", :action => "about_us" > > > > However, this new application has many more pages, and with rather > > complex hierarchies, for example: > > > > site.com/sales-solutions/fast-foods/photo-gallery > > <http://site.com/sales-solutions/fast-foods/photo-gallery> > > > > (photo-gallery is exclusive, static, content-only sub-section of > > fast-foods and has nothing to do with a photo-gallery application > > other than advertising this service) > > > > I''m not sure on how I could best handle situations like this. Maybe > > Rails has a CMS plugin or something that helps in managing static pages? > > > > If you ever had to deal with a situation like this, please, share your > > experience and thoughts! > > > > Any hints greatly appreciated! > > > > Thanks, > > > > Marcelo. > > I use Radiant CMS. I haven''t yet needed to marry it with a Rails > application but I believe it can be done - there are a couple of > extensions for Radiant that support it. > > Cheers, > Mohit. > 6/23/2008 | 12:47 AM. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
To handle a limitless number of custom page urls, I use a catch-all route at the end of config/routes.rb: map.path ''*url'', :controller=>''paths'', :action=>''show'', :conditions=>{:method=>:get} Custom urls using this route will be overridden by the other routes in routes.rb, and any files in public/ that match the url. My paths controller manages Path objects, which use polymorphic belongs_to relations to attach arbitrary paths (relative to my web- server root) to any displayable object (in my case, this includes things like Pages and Events). My code for this is part of my Wayground project, viewable at: http://github.com/grantneufeld/wayground/tree/master Of particular interest are: app/controllers/paths_controller.rb app/controllers/pages_controller.rb app/models/page.rb app/models/path.rb I should probably pull my path handling stuff out into some sort of acts_as_custom_url plug-in. Will post to this list if I do get around to that. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks a lot for sharing, Grant. On Mon, Jun 23, 2008 at 9:14 PM, Grant <activist-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > To handle a limitless number of custom page urls, I use a catch-all > route at the end of config/routes.rb: > map.path ''*url'', :controller=>''paths'', :action=>''show'', > :conditions=>{:method=>:get} > > Custom urls using this route will be overridden by the other routes in > routes.rb, and any files in public/ that match the url. > > My paths controller manages Path objects, which use polymorphic > belongs_to relations to attach arbitrary paths (relative to my web- > server root) to any displayable object (in my case, this includes > things like Pages and Events). > > My code for this is part of my Wayground project, viewable at: > http://github.com/grantneufeld/wayground/tree/master > Of particular interest are: > app/controllers/paths_controller.rb > app/controllers/pages_controller.rb > app/models/page.rb > app/models/path.rb > > I should probably pull my path handling stuff out into some sort of > acts_as_custom_url plug-in. Will post to this list if I do get around > to that. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---