What I am trying to do is create subpages within the main page. 

So if the top navigation is
 
- Home
www.example.com/

- About
www.example.com/about

- Contact
www.example.com/contact

- Support
www.example.com/support

I would want a sub navigation under the pages like so;

- Home
www.example.com/

- About
www.example.com/about

----- History
www.example.com/about/history

----- Locations
www.example.com/about/locations

----- Careers
www.example.com/about/careers

- Contact
www.example.com/contact

- Support
www.example.com/support

----- Products
www.example.com/support/products

----- Forum
www.example.com/support/forum 

Would I need to create a new controller for each page category? (i.e. home, 
about, contact, support). And then add the pages within each respective 
category. 

The big problem I am having currently is routing the pages. 

So I currently have the top level navigation all done under 1 controller 
(static_pages_controller.rb) & the routes.rb (match '/about', to: 
'static_pages#about'). 

So I am trying to figure out how I would add the subpages for about 
(history, location, careers) so they the url www.example.com/about/history 
etc. 

I'm sure there is an easy way to do this, but I can't seem to figure it 
out! Any help would be much appreciated!!

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/JzJAJYvaJOIJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to