Skip to content

Custom component and actions

glushkovds edited this page May 29, 2019 · 4 revisions

Adding custom component with default and my actions, that available by url: http://site/custom/ and http://site/custom/my/

  1. Add new dir /ext/custom
  2. Add component file /ext/custom/comcustom.class.php
<?php

class ComCustom extends ComAction {

  public function actionIndex(){
    // there is default action
  }

  public function actionMy(){
    // there is my action
  }

}
  1. Add component to DB:

  1. Add access component url in menu manager

Clone this wiki locally