Welcome Guest, Not a member yet? Register   Sign In
Best Practice Regarding Controllers / Site Structure
#3

[eluser]Udi[/eluser]
I would make "page" controller, that loads content from the DB.

I don't think creating methods for each page is good idea even if its a small amount of pages.

Create new table called pages:
ID,
ParentID - New Tooling for example,
Title
Content
UrlTitle - for cool urls like example.com/page/Inspection_and_Metrology,
The UrlTitle is the identifier of the page in your site, not the ID.

Write a model that retrieves you content of page by the UrlTitle segment... and you're good to go.


Messages In This Thread
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-24-2009, 10:12 AM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-24-2009, 11:07 AM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-24-2009, 11:15 AM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-24-2009, 11:50 AM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-24-2009, 05:05 PM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-25-2009, 01:41 AM
Best Practice Regarding Controllers / Site Structure - by El Forum - 10-29-2009, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB