something like PHP imports or ASP WUC

N

Nick

i am used to work with php, and mostly i create an menu on one page and the
content on another page (2 template and i load the one in the other), so i
dont have to put the menu on every page, when i want to update something
from the menu then i dont need to change it ex 20 times, like a Web user
control in asp

is there something like this in ruby
 
J

James Britt

Nick said:
i am used to work with php, and mostly i create an menu on one page and the
content on another page (2 template and i load the one in the other), so i
dont have to put the menu on every page, when i want to update something
from the menu then i dont need to change it ex 20 times, like a Web user
control in asp

is there something like this in ruby

Well, there are numerous templating libraries written in Ruby, each with
some form of external file inclusion.

For example, in Nitro, one can do

<body>
<render href="header" />

....


where "header" refers to an external common file.


http://rubyforge.org/projects/nitro




James
--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
 
C

Collins, Justin

------_=_NextPart_001_01C5C1FD.952ED810
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Something along the lines of eRuby or erb would probably feel the most =
familiar, coming from PHP:

http://www.modruby.net/en/index.rbx/eruby/

http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/

Also, the built-in CGI class could do the same.

-Justin


-----Original Message-----
From: Nick [mailto:[email protected]]
Sent: Sun 9/25/2005 6:11 AM
To: ruby-talk ML
Subject: something like PHP imports or ASP WUC
=20
i am used to work with php, and mostly i create an menu on one page and =
the
content on another page (2 template and i load the one in the other), so =
i
dont have to put the menu on every page, when i want to update something
from the menu then i dont need to change it ex 20 times, like a Web user
control in asp

is there something like this in ruby






------_=_NextPart_001_01C5C1FD.952ED810--
 
D

Devin Mullins

Try Rails, too.

http://www.rubyonrails.com/
1. See the webpage for details on the mailing list.
2. Rails Layouts do exactly what you'd like. Running script/generate
scaffolding foo will show you an example of a layout (under
app/views/layouts).

Devin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top