OpenCart将页面添加到布局 [英] OpenCart adding page to the layout
问题描述
在opencart的每个模块和每个部分中,我们都会看到一个名为layout的下拉列表.通常包含诸如类别,新闻,产品,默认设置,主页等页面.
In every module and section of opencart we see a drop down called layout. Which usually contains pages such as category, news, product, default, home, etc...
如何在此部分添加页面?
How can I add a page to this section?
现在,我可以通过信息->插入来添加CONTENT_PAGE.
Now, I can add a CONTENT_PAGE via information->insert.
否则,我通常通过创建控制器和模板来做到这一点,但是Opencard不能正式识别我创建的页面.
Else, I usually do it by creating a controller and a template, but the page I create is not formally recognized by opencard.
我的问题是,我应该通过在项目文件夹中手动制作控制器和模板来使公开卡片识别我创建的页面.怎么样?
My question is that I should I make open card recognize my page which I create by making a controller and a template manually within the project folder. How?
预先感谢
推荐答案
尽管这些问题更适合OpenCart论坛而不是SO,但我会尽力回答第一个问题:
Though these questions suit more for OpenCart forum instead of SO, I'll try to answer the first one shortly:
如何在此部分添加页面?
转到管理->系统->设计->布局,然后点击插入按钮.在这里您可以定义新的布局(例如,您有一个带有控制器的自定义页面,可以通过URL index.php?route=information/mycustominformation
访问该页面,将其路由information/mycustominformation
添加为新的布局路由).
How can I add a page to this section?
Go to administration -> System -> Desgin -> Layouts and click on Insert button. Here You can define a new layout (e.g. You have a custom page with controller that is accessed via URL index.php?route=information/mycustominformation
, add it's route information/mycustominformation
as a new layout route).
我完全不清楚第二个问题.您能更具体地描述更多细节吗?
The second problem is completely unclear to me. Can You be more specific and describe in more details?
这篇关于OpenCart将页面添加到布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!