How to create a controller.php? - Joomla! Forum - community, help and support


i've gone through hello world mvc component @ here http://dev.joomla.org/component/option, ... orld_mvc1/

i kind of know how write controller when reading tutorial. however, lost when read controller.php in com_contact (joomla built-in). how know write 1 this:

code: select all

class contactcontroller extends jcontroller
{
   /**
    * display view
    */
   function display()
   {
      $document =& jfactory::getdocument();

      $viewname   = jrequest::getvar('view', 'category', 'default', 'cmd');
      $viewtype   = $document->gettype();

      // interceptors support legacy urls
      switch ($this->gettask())
      {
         //index.php?option=com_contact&task=category&id=0&itemid=4
         case 'category':
            $viewname   = 'category';
            $layout      = 'default';
            break;
         case 'view':
            $viewname   = 'contact';
            $layout      = 'default';
            break;
      }


can walk me through? or should buy book on joomla! 1.5 extension development??

thanks lot!!!

there lot going on there, , explaining difficult depending on knowledge of php , oo.  buying book helpful.

could interesting read: http://www.manning.com/reiersol/ .

tcp





Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???