欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Views rows style模板重写代码

程序员文章站 2022-05-14 13:20:30
以下是代码例子。 复制代码 代码如下: nid; $country = db_result(db_query('selec...

以下是代码例子。

复制代码 代码如下:

<?php
$nid = $row->nid;
$country = db_result(db_query('select name from {term_data} term_data join {term_node} term_node on term_node.tid = term_data.tid where term_data.vid = %d and term_node.nid = %d', 1, $nid));
$investment = db_result(db_query('select name from {term_data} term_data join {term_node} term_node on term_node.tid = term_data.tid where term_data.vid = %d and term_node.nid = %d', 2, $nid));
?>
<div class="article-l">
<?php echo $fields['title']->content ?>
<div class="left-content">
<?php echo $fields['body']->content ?>
</div>
</div>
<div class="article-r">
<div class="right-content">
<?php echo $fields['body_1']->content ?>
</div>
<div class="article-link">
<?php echo instanter_country_code($country) ?> <?php echo $fields['created']->content ?> <?php echo instanter_investment_code($investment) ?>
<?php echo $fields['view_node']->content ?>
</div>
</div>
<div class="clear-both"></div>
相关标签: rows style