Pursuing a dream list of pages on the output page a column and the next column

Pursuing a dream content on a page have the next article, not on a lower section of a column, we do not modify the kernel files, directly in the template with a section on runphp output and the next column

On a lower section of a column label wording

  • Apply to a list of pages, content pages
  • For dynamic and static
{dede:field.typeid runphp=yes}
global $dsql;
$topreid = (@me==GetTopid(@me)) ? @me : GetTopid(@me);
$row = $dsql->GetOne("SELECT * FROM `#@_arctype` WHERE reid=$topreid AND id<@me order by id desc"); if(!is_array($row)) { @me = "<li>上一个栏目:没有了</li>"; } else { $row['typeurl'] = GetOneTypeUrlA($row); @me = "<li>上一个栏目:<a href='{$row['typeurl']}'>{$row['typename']}</a></li>"; } {/dede:field.typeid} {dede:field.typeid runphp=yes} global $dsql; $topreid = (@me==GetTopid(@me)) ? @me : GetTopid(@me); $row = $dsql->GetOne("SELECT * FROM `#@_arctype` WHERE reid=$topreid AND id>@me order by id asc"); if(!is_array($row)) { @me = "<li>下一个栏目:没有了</li>"; } else { $row['typeurl'] = GetOneTypeUrlA($row); @me = "<li>下一个栏目:<a href='{$row['typeurl']}'>{$row['typename']}</a></li>"; } {/dede:field.typeid}

Guess you like

Origin www.cnblogs.com/jizl/p/11291909.html