typecho添加文章类型字段,并调用不同样式
function.php

function themeFields($layout) {
    $Pictype= new Typecho_Widget_Helper_Form_Element_Radio('Pictype',array('0' => _t('无'),'1' => _t('大图'),'2' => _t('多图')),'0',_t('文章类型'),_t("选择文章类型,模板设置在数据列表显示不同的样式,比如大图和三图并列的文章列表"));
    $layout->addItem($Pictype);
}

调用方法

<?php while($this->next()): ?>
<?php if ($this->fields->Pictype == 1) { ?>
    类型为大图的文章调用的相关代码,设置单独的class和结构
<?php } elseif ($this->fields->Pictype == 2) { ?>
    类型为多图的文章调用的相关代码,设置单独的class和结构,在我的博客里,这里显示三张图片
<?php } else {?>
    一般文章列表的相关代码,显示普通的样式
<?php }?>
<?php endwhile; ?>

扫描二维码,在手机上阅读!