Actions

J1.5 talk

Difference between revisions of "Developing a MVC Component/Introduction"

From Joomla! Documentation

(Use lowercase file and folder names in your components!: new section)
(View naming conventions: new section)
Line 6: Line 6:
  
 
When creating custom components try to use file names and folder names with all lowercase letters.  I had created some complex MVC components, naming my folders and files after my classes in the component.  This meant that I had upper and lowercase letters in the folder and file names.  During testing on my Windows machine everything worked fine, but when I transfered to a remote host running unix, nothing worked properly.  The errors provided by the framework were only slightly helpful in identifying the root cause which was that the JPath:: class implicitly calls strtolower() on all paths.  Therefore my files were not being found by the framework.  I hope this helps save someone some time.
 
When creating custom components try to use file names and folder names with all lowercase letters.  I had created some complex MVC components, naming my folders and files after my classes in the component.  This meant that I had upper and lowercase letters in the folder and file names.  During testing on my Windows machine everything worked fine, but when I transfered to a remote host running unix, nothing worked properly.  The errors provided by the framework were only slightly helpful in identifying the root cause which was that the JPath:: class implicitly calls strtolower() on all paths.  Therefore my files were not being found by the framework.  I hope this helps save someone some time.
 +
 +
== View naming conventions ==
 +
 +
It should probably be mentioned that the naming of the "view" script is strictly as named here; Joomla looks for "view.html.php" for the class to render HTML, and "view.feed.php" for a feed display, etc. I at first omitted the ".html" double extension from my file, and quickly ran into errors, so it might be best to mention that, the same way the entry point file name has to match the component name. --[[User:MidnightLightning|MidnightLightning]] 16:35, 6 April 2009 (UTC)

Revision as of 11:35, 6 April 2009

is there anyway to make the font for ".source-php .kw1" a more printer friendly color yet still be distinguishable as important text? At the very least lets make the font "bold" so it is stronger in contrast. Even in the highest quality setting on printer it appears very washed out to these old eyes.

You can add your own stylesheet to override any of the system-generated styles by adding a special subpage under your user page. In your case, create the page User:N6REJ/monobook.css and add your CSS rules into it. Chris Davenport 08:55, 19 January 2009 (UTC)

Use lowercase file and folder names in your components!

When creating custom components try to use file names and folder names with all lowercase letters. I had created some complex MVC components, naming my folders and files after my classes in the component. This meant that I had upper and lowercase letters in the folder and file names. During testing on my Windows machine everything worked fine, but when I transfered to a remote host running unix, nothing worked properly. The errors provided by the framework were only slightly helpful in identifying the root cause which was that the JPath:: class implicitly calls strtolower() on all paths. Therefore my files were not being found by the framework. I hope this helps save someone some time.

View naming conventions

It should probably be mentioned that the naming of the "view" script is strictly as named here; Joomla looks for "view.html.php" for the class to render HTML, and "view.feed.php" for a feed display, etc. I at first omitted the ".html" double extension from my file, and quickly ran into errors, so it might be best to mention that, the same way the entry point file name has to match the component name. --MidnightLightning 16:35, 6 April 2009 (UTC)