<?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', 2), 'main/content.view#pic')
->fetch(array('.article-wrapper img@style', 2), '<{!Dever::load("main/content.view_video")}>', 'none')

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

->fetch(array('.video-module@style', 0), 'main/content.view_video_1', 'none')
->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic')
->fetch(array('.article-wrapper img@src', 1), 'main/content.view#pic')
->fetch(array('.icon-play@data-url', 0), 'main/content.view#video_link')


->fetch(array('.article-video@style', 0), 'main/content.view_video_2', 'none')
->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic')
->fetch(array('.article-wrapper img@src', 1), 'main/content.view#pic')
->fetch(array('.icon-play@data-url', 1), 'main/content.view#video_link')


# 标签
->fetch('.tags h5', 'main/content.view#tag_name')
->fetch('.tags@style', 'main/content.view_tag', 'none')

->loop
(
    '.tags li',
    'main/content.view_tag',
    array
    (
        'a|0' => array
        (
            'href' => '$v.link',
            'title' => '$v.name',
            'html' => '$v.name',
        ),
    )
)

# 热门推荐
->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();  