Hi, this is a design question
I’ve setup a micro-cms for my About pages etc using a “pages” table
containing name, title, body, parent_id, position, and the model is
setup as both acts_as_tree and acts_as_list. The pages table has the
page content, and also is used to define the menus for the tree. This
is working, so far so good.
Some of these pages might contain a list of items from another table,
for example, Board of Directors, shown after the body text. One way
I’m thinking to handle this is
add fields to pages for sub-content model, method name, and partial,
and have the pages controller call the method and pass the data along
to the display_page template (which calls the partial)
What do you think?
An alternative would be to add a controller/action for the other
content and just use the page as a placeholder so it still shows in
the menu. And add a url field to the page model (or even separate
controller, action fields), thats used in the menu link.
linoj