• 网站认证
  • 教程:6,665|
  • 话题:6319|
  • 评论:46|
  • 会员:194|
  • 注册
  • 查看作者
  • Dedecms 分类信息地区名在列表标题title显示

    一.修改include aglibinfolink.lib.php

    主要增加了 

    $fields['puper'] = $em_nativeplaces[$toptype]; 

    与 

    $fields['puper'] .= ' – ' . $em; 

    这段代码改成这样

    以下为引用的内容:

    //地区链接 

    if(empty($nativeplace)) 

    foreach($em_nativeplaces as $eid=>$em) 

    if($eid % 500 != 0) continue; 

    $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a> "; 

    else 

    $sontype = ( ($nativeplace % 500 != 0) ? $nativeplace : 0 ); 

    $toptype = ( ($nativeplace % 500 == 0) ? $nativeplace : ( $nativeplace-($nativeplace%500) ) ); 

    $fields['nativeplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$toptype}&infotype={$infotype}'><b>{$em_nativeplaces[$toptype]}</b></a> >> "; 

    $fields['puper'] = $em_nativeplaces[$toptype]; 

    foreach($em_nativeplaces as $eid=>$em) 

    if($eid < $toptype+1 || $eid > $toptype+499) continue; 

    if($eid == $nativeplace) { 

    $fields['nativeplace'] .= " <b>{$em}</b> "; 

    $fields['puper'] .= ' – ' . $em; 

    else { 

    $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a> "; 

    }

    二、在列表调用里用 

    {dede:infolink}[field:puper/]{/dede:infolink}

    调用 

    同样适用于其他联动类别

  • 0
  • 0
  • 0
  • 44
  • 请登录之后再进行评论

    登录
  • 做任务
  • 实时动态
  • 偏好设置
  • 单栏布局 侧栏位置: