Hi, does anybody have any pointers on where to look to learn how to write custom dynamic templates? Agile is a little sparse on this (but otherwise superb)! Thanx -- Posted via http://www.ruby-forum.com/.
James McCarthy wrote:> Hi, does anybody have any pointers on where to look to learn how to > write custom dynamic templates? Agile is a little sparse on this (but > otherwise superb)!Which part do you want to learn about? Writing pages in (X)HTML, hooking templates into Rails, or using ERb (Embedded Ruby) to dynamically generate HTML? Or partials, layouts, helpers, etc? Writing view templates is a pretty broad topic. This recent article might be a good starting point if you are a web designer: http://glu.ttono.us/articles/2006/03/21/rails-for-designers --josh http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/.
Josh Susser wrote:> Which part do you want to learn about? Writing pages in (X)HTML, > hooking templates into Rails, or using ERb (Embedded Ruby) to > dynamically generate HTML? Or partials, layouts, helpers, etc? Writing > view templates is a pretty broad topic.Sorry Josh I wasn''t specific enough, less haste... I was looking to write a rails template handler as I am having to write multiple cascading partials and the whole thing is becomming rather messy and un-DRY. So in a nutshell "how do I write custom rails template handlers". Thanks. -- Posted via http://www.ruby-forum.com/.
James McCarthy wrote:> I was looking to write a rails template handler as I am having to write > multiple cascading partials and the whole thing is becomming rather > messy and un-DRY. > > So in a nutshell "how do I write custom rails template handlers".Oh, that''s an equine in a different band of the visual spectrum. I haven''t found much docs on that (and I''ve looked). Probably the best thing to do is to look at existing examples, like Markaby and RCSS (on rubyforge.org). And there is a small example in the Rails sources tests: rails/actionpack/test/controller/custom_handler_test.rb --josh http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/.
James McCarthy wrote:> I was looking to write a rails template handler as I am having to write > multiple cascading partials and the whole thing is becomming rather > messy and un-DRY. > > So in a nutshell "how do I write custom rails template handlers".Oh, that''s an equine in a different band of the visual spectrum. I haven''t found much docs on that (and I''ve looked). Probably the best thing to do is to look at existing examples, like Markaby and RCSS (on rubyforge.org). And there is a small example in the Rails sources tests: rails/actionpack/test/controller/custom_handler_test.rb --josh http://blog.hasmanythrough.com -- Posted via http://www.ruby-forum.com/.
>> So in a nutshell "how do I write custom rails template handlers". > > Oh, that''s an equine in a different band of the visual spectrum. I > haven''t found much docs on that (and I''ve looked). Probably the best > thing to do is to look at existing examples, like Markaby and RCSS (on > rubyforge.org). And there is a small example in the Rails sources > tests: > rails/actionpack/test/controller/custom_handler_test.rb > > --josh > http://blog.hasmanythrough.comThanks josh, will give them a gander. -- Posted via http://www.ruby-forum.com/.