我的目录结构如下:
.
|-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 - 未找到 View 。 如何在模块内对小部件进行主题化?
最佳答案
根据manual
您的小部件 View 应位于 /themes/XXXX/views/FooWidget/foo.php
中。
关于php - yii - 如何在模块中对小部件进行主题化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16587015/