English 中文(简体)
在模块烟火CMS 2. 1 中, set_ 主题不工作
原标题:set_theme does not work in module pyroCMS 2.1

我在 adons/ default/ texts 中创建一个自定义主题, 名称为“ uni ” 。 请使用此工作, 因为我可以在 CP 中看到它 。

下一步我创建一个自定义模块,代码 :

class Server extends Public_Controller
{
public function __construct()
{
parent::__construct();

}
public function index()
{
$this->template->title($this->module_details[ name ])->set_theme( uni )->build( test );

}
}

但当我浏览这个模块时,主题仍然是CP上的活动主题, 所以模块控制器中的设置主题无效 。

使用自定义主题而不是更改 CP 中活动主题来制作模块的方法吗?

问题回答

我认为,要更改前端的“主题”, 您需要使用自定义页面布局, 而不是设置主题

如果我理解你的问题 那么这个问题就跟





相关问题
Working with modules in IntelliJ IDEA

As I understand, using modules allows us to control some dependencies. I mean that we can allow one module to interact with another one but not vise versa. We also can make some reusable things and ...

Module import path

I m unable to test-run a cssparser that I d like to use. test.py: from css.parse import parse data = """ em { padding: 2px; margin: 1em; border-width: medium; border-style: ...

Problem modulating action script project

I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk. The project does NOT use the mx framework. What i want to have is: A big MAIN project several small ...

Test modules with Test::Unit

I encountered a problem when trying to test a module with Test::Unit. What I used to do is this: my_module.rb: class MyModule def my_func 5 # return some value end end test_my_module.rb: ...

Drupal section accessible by role

I need to limit access of content on Drupal site based on the Drupal User s Role. http://site.com/managers/intro http://site.com/managers/reviews http://site.com/managers/up-for-raises The ...

How to find where a function was imported from in Python?

I have a Python module with a function in it: == bar.py == def foo(): pass == EOF == And then I import it into the global namespace like so: from bar import * So now the function foo is ...

How to wire two modules in Verilog?

I have written two modules DLatch and RSLatch and i want to write verilog code to join those two.