dqeznd1697 2013-02-24 17:29
浏览 46
已采纳

社交引擎自定义页面添加小部件和更改布局的功能

I want to create a new page like you would see in the admin layout editor. I can create a new page from there but its url is always mysite.com/pages/mypage . If i go into engine4_core_pages i can add a page that references my controller and the action i want. So lets say

mymodule_index_mynewpage Somepage

It will display in the LayoutEditor under Editing dropdown as 'Somepage'. When i select that page to either add widgets to it or change the columns all i get in the middle content area is a top Global Header and Global Footer option to hide or show. There is no open area in the middle when i can place widgets. Screen cap of what im talking about

http://i.imgur.com/rDSy26n.png?1

How can i give the page the ability to change layout and add widgets to it? I cant seem to find it.

Edit: adding to answer below After following the below directions the ability to change the layout is limited. To be able to use all of the "column layouts" you must also place into engine4_core_content.

(auto number), yourpage_id, type=container, name=middle, (parent containers incremented id), order(6 i guess), ["[]"]=params, null=attribs

1234 50 container middle 1000 6 ["[]"] null
  • 写回答

2条回答 默认 最新

  • dongshang5862 2013-02-25 19:45
    关注

    At first, you have to create new row in engine4_core_content with type 'container' and name 'main' (of course page_id there is your page_id). Main container contains 'left', 'right' and 'middle' containers.

    Then, in the end of action that refers to your page (mymodule_index_mynewpage), you can use something like this to display content which configured using layout editor for your specific action:

    $this->_helper->content
            ->setContentName(48) // page_id
            ->setNoRender()
            ->setEnabled();
    return;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥15 对于这个问题的算法代码
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题