[eluser]John_Betong[/eluser]
[quote author="gavincali" date="1189216822"]
I'm using my controller, called browse.php, to call only 1 view file, called browseview.php. This view file calls other view files from a folder called /includes... and sometimes the include calls and include...etc...
My question: Should my controller (browse.php) be able to choose from the 12 or so view files to call directly -OR- should it only call it's mate-view (browseview.php), and let this mate-view act as a traffic-cop to the other view includes?
thanks.
[/quote]
Hi GavinCali,
I am in the process of writing a new application and have the following files in my view folder.
Code:
..
contactus.php
docs.php
formsuccess.php
hire.php
home.php
myform.php
products.php
_doctype_strict.php
_doctype_transit.php
_doc_faqs.php
_doc_links.php
_doc_privacy.php
_doc_sitemap.php
_doc_terms.php
_home_welcome.php
_com_analytics.php
_com_footer.php
_com_header.php
_com_menu_left.php
_com_pic_msg.php
_com_title.php
_hire_box.php
_hire_credit.php
_hire_cyclecarrier.php
_hire_dates.php
_hire_form.php
_hire_location.php
_hire_menu.php
_hire_vehicle.php
_home_products.php
As you may presume from the naming convention I have:
1. one controller for most of the files without a "_" prefix
2. files prefixed with "_xxxx" are assocated with the "xxxx.php" controller and view.
3. files prefixed with "_com" can be used with all views.
This has worked well and especially since my editor automatically lists the files alphabetically.