Though I would assert that Colin's suggestion is the better, you might
also consider using a static site generator for your static content:
something like nanoc or jekyll.

On Fri, Nov 26, 2010 at 1:48 PM, MDM <[email protected]> wrote:
> Thanks for that which gives me an idea to create one controller and
> import each static page content into it somehow. Then I would not have
> to even worry about updating the menu at all.
>
> On Nov 26, 12:24 pm, Colin Law <[email protected]> wrote:
>> On 26 November 2010 12:04, MDM <[email protected]> wrote:
>>
>>
>>
>> > I have several static files(pages), which are basically copies of my
>> > website pages source code, with the content changed.
>> > These files support my website, (keeping the same format) in various
>> > ways.
>> > For example the menu part is:-
>>
>> > <body>
>>
>> >        <div id="menu">
>>
>> > <ul class="level1" id="root">
>> > etc
>> > etc. until
>> > </ul>
>> >        </div>
>>
>> > Unfortunately every month or so my menu bar changes and I have to
>> > update each static file manually.
>> > As each of my static files have the same menu.
>> > Is it possible to have one menu file which can be updated and have the
>> > static files load them automatically.
>> > I plan to have several more static files. So this would be a great
>> > help if someone can suggest how to accomplish this.
>>
>> I would recommend providing a 'main' controller (or whatever you want
>> to call it) that just serves up the effectively static pages.
>> Initially you can just put the html straight into each page.html.erb
>> and render them specifying no layout.  Then you can refactor them and
>> use the rails capabilities of partials, helpers and so on to put your
>> re-usable menu into a partial to make life easy.
>>
>> Colin
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to