按钩子简单制作-tag加连接解说版的帖子https://x1.php168.com/bbs/show-503.html操作后,内容页{$info.keyword}调出的关键字没加上链接?要如何操作才能给关键字没加上链接??
application\common\hook已经有Keyword.php
pc_layout.htm也有三个
******
<!--下面是钩子插件,做风格的时候尽量加上,方便扩展 -->{:hook_listen('layout_body_head',$userdb,$webdb,true)}
******
<!--下面是钩子插件,做风格的时候尽量加上,方便扩展-->{:hook_listen('layout_body',$userdb,$webdb,true)}
******
<!--下面是钩子插件,做风格的时候尽量加上,方便扩展-->{:hook_listen('layout_body_foot',$userdb,$webdb,true)}
******
这样的代码
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>{block name="head_title"}{$webdb.seo_title?:$webdb.webname}{/block}</title> <meta http-equiv="X-UA-Compatible" content="IE=8"><!-- 强制ie8,for 360 --> <meta name="keywords" content='{block name="head_keword"}{$webdb.seo_keyword}{/block}'> <meta name="description" content='{block name="head_description"}{$webdb.seo_description}{/block}'> <meta name="referrer" content="never"> <script type="text/javascript" src="__STATIC__/js/qibo.js"></script> <script type="text/javascript" src="__STATIC__/js/core/jquery.min.js"></script> <script type="text/javascript" src="__STATIC__/layer/layer.js"></script> <link rel="stylesheet" type="text/css" href="__STATIC__/bendibaike/static/css/common.css" /> <link rel="stylesheet" type="text/css" href="__STATIC__/css/qb_ui.css" /> <link rel="stylesheet" type="text/css" href="__STATIC__/icon/icon.css"> <link rel="stylesheet" type="text/css" href="__STATIC__/css/pc_reset.css"> <link href="__STATIC__/bendibaike/static/css/head.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="__STATIC__/bendibaike/static/js/jquery.superslide.js"></script> <body> <!--下面是钩子插件,做风格的时候尽量加上,方便扩展 --> {:hook_listen('layout_body_head',$userdb,$webdb,true)} {block name="body_Headcont"} <div class="rtj1009_header cl"> <div class="wp"> <div class="ren_headera cl"> <div class="hdc cl"> <h5><a href="/" title="{$webdb.webname}"><img src="{$webdb.logo?tempdir($webdb.logo):'__STATIC__/index/default/logo.png'}" alt="{$webdb.webname}" border="0"></a></h5> <div class="rtj1009_sousuo z"> <form id="scform" method="get" autocomplete="off" action="{:urls('search/index/lists')}" target="_blank"> <input type="text" name="keyword" id="rtj_ssk_txt" placeholder="请输入你想搜索内容" > <button type="submit" id="rtj_ssk_btn" sc="1" class="ren_sspn ren_sspnc" value="true"><span class="ren_sskfdj"></span></button> </form> </div> <div class="nextpright y" style="padding-top: 20px;"> <div class="y ren_list_flft cl"> <a href="/member.php/member/index.html" onClick="showWindow('nav', this.href, 'get', 0)" class="ren_hd_fabu">免费发布信息</a> </div> </div> </div> </div> </div> <div id="nv" class="toubuxiabian" style="top: 0px; left: 0px; z-index: 199;"> <div class="rtj1009_nv cl"> <ul class="ren_nv cl"> <div class="Logo_Menu"> <ul> {php}$menu_choose=config('system_dirname')?config('system_dirname'):'index';{/php} {volist name="pc|get_web_menu" id="rs"} <dl {if ($rs['activate']==$menu_choose||$rs['activate']==$menu_choose.'-'.$fid)}class="ck"{/if}> <dt><li><a href="{$rs.url}" {notempty name="$rs.target"}target="_blank"{/notempty}><i class="{$rs.style|default=''}"></i>{$rs.name}</a></li></dt> {notempty name="rs.sons"} <span></span> <dd> {volist name="rs.sons" id="vs"} <div><a href="{$vs.url}" {notempty name="$rs.target"}target="_blank"{/notempty}><i class="{$rs.style|default=''}"></i>{$vs.name}</a></div> {/volist} </dd> {/notempty} </dl> {/volist} </ul> </div> </div> </div> {/block} {block name="body_content"}{/block} <!--下面是钩子插件,做风格的时候尽量加上,方便扩展--> {:hook_listen('layout_body',$userdb,$webdb,true)} {block name="body_Footcont"} <link href="__STATIC__/bendibaike/static/css/foot.css" type="text/css" rel="stylesheet" /> <div class="Footer"> <div class="CopyrightBox"> <div class="Copyright"> <span> {$webdb.copyright}<a href="http://www.miibeian.gov.cn" target="_blank">{$webdb.miibeian_gov_cn}</a> Powered by <a href="http://www.php168.com" target="_blank">qibosoft {$webdb.QB_VERSION}</a> Code © 2018 <a href="http://bbs.qibosoft.com/" target="_blank">qibosoft</a> </div></span> <span></span> </div> </div> </div> <!--下面是钩子插件,做风格的时候尽量加上,方便扩展--> {:hook_listen('layout_body_foot',$userdb,$webdb,true)} {/block} </body> </html>
感谢@suifeng,这个连接不对呀,提示关键词不能为空,对比了一下关键词链接,正确的是
/index.php/search/index/lists.html?keyword=%E4%BB%96%E7%94%9F%E6%97%A5
此教程下的连接是
/index.php/search/index/lists/keywords/%E4%BB%96%E7%94%9F%E6%97%A5.html
这是没有伪静态的原因吗
不会用