Yii Framework Forum: yiic shell own templates for "model" command - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

yiic shell own templates for "model" command Rate Topic: -----

#1 User is offline   OriginalCopy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-March 09

Posted 06 March 2010 - 07:20 AM

Hi

Where is it recommended to put my own templates for my own shell commands, i.e the $templatePath, as in:
Yii::import('system.cli.commands.shell.ModelCommand');
class ExtmodelCommand extends ModelCommand
{
        /**
         * @var string the directory that contains templates for the model command.
         * Defaults to null, meaning using 'framework/cli/views/shell/model'.
         * If you set this path and some views are missing in the directory,
         * the default views will be used.
         */
        public $templatePath;
}

which is in protected/commands/shell/ExtmodelCommand.php?
0

#2 User is offline   Theill11 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 51
  • Joined: 03-March 10
  • Location:@ localhost

Posted 06 March 2010 - 11:24 AM

The directory is all up to you and where you think it is logic to place it.

I have put my model-templates in: application.commands.shell.views.model
And my controller-templates in application.commands.shell.views.controller and so on...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users