开发者

ATK4 How change view

开发者 https://www.devze.com 2023-02-28 10:41 出处:网络
....Views can have a default template or it can be specified or inherit开发者_运维技巧ed. For example - default template of Api class is \"shared.html\" - that\'s where your header/footer is....

....Views can have a default template or it can be specified or inherit开发者_运维技巧ed. For example - default template of Api class is "shared.html" - that's where your header/footer is....

How or where can I change default view/template from shared.html e.g. to (3-columns-layout, 2-columns-layout, 1-columns-layout).html?


Redefine a function called defaultTemplate() in api and return the name of a new file. Normally when you do that you also add some logic based on page names. Below is example

function defaultTemplate(){
    if($this->page=='index')return array('index');
    return array('shared');
}

If you need to use columns, look into 'View/Columns' class.

0

精彩评论

暂无评论...
验证码 换一张
取 消