<?php

$view

->set('name', 'article')
->set('title', 'main/content.view#name') 

->import('inc/head')

->fetch('body@test', '1')

->fetch('.common-tit span', 'main/content.view#sname')
->fetch('.common-tit em', 'main/content.view#pdate_string')

->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic')

->fetch(array('.article-content article', 0), 'main/content.view#content')

# 热门推荐
->loop
(
    '.article-recs li',
    'main/content.hot',
    array
    (
        'a|0' => array
        (
            'href' => '$v.link',
            'title' => '$v.name',
            'img' => array 
	        (
	            'src' => '$v.pic',
	            'alt' => '$v.name',
	        ),
        ),

        'a|1' => array
        (
        	'href' => '$v.link',
            'title' => '$v.name',
            'html' => '$v.name',
        ),
    )
)

->fetch('.article-recs@style', 'main/content.hot', 'none')

# 广告
->loop
(
    '.ad-swiper .swiper-slide',
    'main/content.ad|key=news_view_ad&name=资讯详情页广告',
    array
    (
        'a' => array
        (
            'href' => '$v.link',
            'title' => '$v.name',
        ),

        'img' => array
        (
            'src' => '$v.pic',
            'alt' => '$v.name',
        ),
    )
)

->fetch('.ad-swiper@style', 'main/content.ad?key=news_view_ad&name=资讯详情页广告', 'none')

->import('inc/foot')

->display();  