2

我的目录结构如下:

   .
   |-config
   |-modules
   |---articles
   |---catalog
   |-----components
   |-----controllers
   |-----fixtures
   |-----migrations
   |-----models
   |-----views
   |-----widgets <----------------- MY WIDGETS
   |------ FooWidget.php
   |-------views
   |--------- foo.php <--- default view, not working
   |-runtime
   |-tests
   |-themes
   |---XXXX
   |-----assets
   |-----views
   |-------catalog <--------------- MODULE VIEWS
   |-------layouts
   |-------widgets
   |-views
   |-widgets

我调用 $this->widget('application.modules.catalog.widgets.FooWidget') - 并捕获异常 CException - 未找到视图。如何在模块内对小部件进行主题化?

4

1 回答 1

2

根据手册, 您的小部件视图应位于/themes/XXXX/views/FooWidget/foo.php.

于 2013-05-16T13:28:04.063 回答