{imp:"topic/exdemo/topb~frame"}

{block:infos}

<div class="topic-post">
    <?php $data = devTopic::fmtRow($this->key,'basic'); ?>
    <h2 class="topic-post-title">{=$data['title']}</h2>
    <div class="row">
      <div class="col-md-6">
          <img src="{=$data['mpic']}" width="100%" alt="{=$data['mpic']}">
      </div>
      <div class="col-md-6">
          <ul>
            <?php if(empty($data['utags'])){ ?>
            <li>{=$data['tags']}</li>
            <?php }else{ foreach($data['utags'] as $k1=>$v1) { ?>
            <li>{=$k1} : {=$v1}</li>
            <?php } } ?>
          </ul>
      </div>
    </div>
</div>

<?php
$fcfg = devTopic::cfg2arr($chtml); 
foreach ($fcfg as $k2=>$title) {
$data = devTopic::fmtRow($this->key,$k2);
?>
<div class="topic-post">
    <h2 class="topic-post-title">
    {if !empty($data['jump'])}<a href="{=$data['jump']}" target="_blank">{/if}
        {title($data['title'],60,$data)}
    </a></h2>
    <p class="topic-post-meta">{=$data['tags']}</p>
    <p class="remark">
        {html($data['detail'],1500,1)} 
    </p>
</div><!-- /.blog-post -->
<?php } ?>

<?php
$fcfg = devTopic::cfg2arr($cpics); 
foreach ($fcfg as $k2=>$title) {
$data = devTopic::fmtRow($this->key,$k2,1,1);
?>
<div class="topic-post">
    <h2 class="topic-post-title">图册-{=$data['title']}</h2>
    <p class="topic-post-meta">
        {=$data['tags']}
    </p>
    <div class="row">
      <?php if(!empty($data['upics'])){ foreach ($data['upics'] as $img) { ?>
      <div class="col-xs-6 col-md-3">
        <a class="thumbnail">
          <img src="{=$img}" alt="{=$img}">
        </a>
      </div>
      <?php } } ?>
    </div>
</div>
<?php } ?>

{/block:infos}
