<?php

$view

->set('$title', 'Dever::input("cate") ? Dever::load("forum/cate.info#name") : "社区"')

->set('Dever::setInput("model_page", 2)')

# 此处必须做下初始化，否则得不到下面的总数
->set('Dever::load("forum/posts.getList")')

//->set('$forum', 'Dever::view("_model/3")')

->loop
(
    '#dever_type li',
    'forum/posts.config',
    array
    (
		'a' => array
        (
            'href' => '<{Dever::load("forum/posts.type#link", $v)}>',
            'class' => '<{Dever::load("forum/posts.type#class", $v)}>',
            'i' => array
            (
            	'class' => 'glyphicon glyphicon-<{$v.icon}>',
            ),
            'span' => array
            (
            	'html' => '<{$v.name}>',
            )
        ),
    )
)

->fetch('#dever_forum','<{Dever::load("forum/posts.getList")}>')

->fetch('#dever_page','<{Dever::page("current")}>')

->fetch('#dever_top@style', '<{Dever::load("forum/posts.top#display")}>')

->fetch('#dever_top_pic@style', '<{Dever::load("forum/posts.top#pic") ? "" : "display:none;"}>')

->fetch('#dever_top_pic img@src', '<{Dever::load("forum/posts.top#pic")}>')

->fetch('#dever_top_name', '<{Dever::load("forum/posts.top#name")}>')

->fetch('#dever_top_info', '<{Dever::load("forum/posts.top#info")}>')

->fetch('#dever_top_total', '<{Dever::load("forum/posts.top#total")}>')

->display();