ATK4 How change view
....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.
精彩评论