Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2008, 09:06 AM
Junior Member
 
Join Date: Apr 2008
Posts: 5
Default dynamic web structure

Hi.

It is easy to make website which uses one controller to manage one section.
How about situation: I want to have my sections generated from db, where are stored in tree structure model?
I want to get section x, and load it content. It is typical CMS functionality to manage website sections.

I`d like to use ZF MVC approach so I`m thinking about:
1. check if controller exists
2. if doesn`t exist use errorController
3. redirect to the SectionsController
4. check if param name exists in DB as a section
5. if exists load appropriate content, else '404'

Of course if controller exists it is used as default.
New section or subsection or subsubsection... is easy to add, edit or remove. It`s possible to generate sitemap, etc.

What do you think about this approach? Am I going in the right direction or maybe I`m missing something and trying to find solution which is already fount.

Thanks for any suggestions.

Regards

Last edited by Michał : 04-22-2008 at 09:09 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-22-2008, 06:18 PM
Member
 
Join Date: Jan 2008
Location: chicago
Posts: 98
Default

that sounds fine. Read up on custom routes. so that when you type in this this:

PHP Code:
http://www.domain.com/reviews 
it translates to this:

PHP Code:
http://www.domain.com/content/view/page_name/reviews 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-23-2008, 05:01 AM
Junior Member
 
Join Date: Apr 2008
Posts: 5
Default

Thanks for suggestion, notrub225. I will play with routes.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:08 AM.