I would know if it''s possible to do the following: I have a head-DIV, main-Div and a navigation-DIV and a global application Layout. --------------------------- - head - - link1 link2 link3 - --------------------------- - - - - - - - nav - main - - - - - - - - - - --------------------------- When I click a link in the head-DIV (link_to) I load the according rhtml-File within the controller -> the main-DIV is updated showing the requested content. How can I update the nav-DIV to present a submenu to the user? Must I call a render calling a rjs file with replace_html or is there a more recommended way to do this? Thanx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 5/28/07, jochen kaechelin <gissmoh-Vg5pTm5GbeLoK6nBLMlh1Q@public.gmane.org> wrote:> > I would know if it''s possible to do the following: > > I have a head-DIV, main-Div and a navigation-DIV and a > global application Layout. > > --------------------------- > - head - > - link1 link2 link3 - > --------------------------- > - - - > - - - > - nav - main - > - - - > - - - > - - - > --------------------------- > > > When I click a link in the head-DIV (link_to) I load > the according rhtml-File within the controller -> the main-DIV > is updated showing the requested content. > > How can I update the nav-DIV to present a submenu to the user? > Must I call a render calling a rjs file with replace_html or is > there a more recommended way to do this?That would be the best idea IMO. I had to do the same you need and i tried some solutions, the best one to keep clean code and performance is the rjs with the replace_html.> > Thanx >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Emilio Tagua schrieb:> On 5/28/07, jochen kaechelin <gissmoh-Vg5pTm5GbeLoK6nBLMlh1Q@public.gmane.org> wrote: >> I would know if it''s possible to do the following: >> >> I have a head-DIV, main-Div and a navigation-DIV and a >> global application Layout. >> >> --------------------------- >> - head - >> - link1 link2 link3 - >> --------------------------- >> - - - >> - - - >> - nav - main - >> - - - >> - - - >> - - - >> --------------------------- >> >> >> When I click a link in the head-DIV (link_to) I load >> the according rhtml-File within the controller -> the main-DIV >> is updated showing the requested content. >> >> How can I update the nav-DIV to present a submenu to the user? >> Must I call a render calling a rjs file with replace_html or is >> there a more recommended way to do this? > > That would be the best idea IMO. I had to do the same you need and i > tried some solutions, the best one to keep clean code and performance > is the rjs with the replace_html.Could you give me a code-example please? controller: def index end template: index.rhtml (rendered in the main-DIV) Where must I put the rjs code that the navigation gets updated when the index.rhtml is rendered? Thanx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---