Forum: Ruby on Rails Adding Custom templates?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A025f68d8100c2f0fa78c6cfcc4cbfd1?d=identicon&s=25 James Mccarthy (noagenda)
on 2006-03-22 23:39
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
9f0f89bbd9e1ecfbaab6584e429b7a2f?d=identicon&s=25 Josh Susser (jsusser)
on 2006-03-22 23:58
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
A025f68d8100c2f0fa78c6cfcc4cbfd1?d=identicon&s=25 James Mccarthy (noagenda)
on 2006-03-23 00:09
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.
9f0f89bbd9e1ecfbaab6584e429b7a2f?d=identicon&s=25 Josh Susser (jsusser)
on 2006-03-23 00:27
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
9f0f89bbd9e1ecfbaab6584e429b7a2f?d=identicon&s=25 Josh Susser (jsusser)
on 2006-03-23 00:27
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
A025f68d8100c2f0fa78c6cfcc4cbfd1?d=identicon&s=25 James Mccarthy (noagenda)
on 2006-03-23 00:44
>> 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

Thanks josh, will give them a gander.
This topic is locked and can not be replied to.