业务经理

微信扫描以上二维码

028-61286886

技术咨询

建立栏目的时候用外链类型,但是怎么做到跳转到新网页打开,原网站不变呢,就是新弹出网页

迅睿框架 更新 2019-05-24 18:01:39 master888

建立栏目的时候用外链类型,但是怎么做到跳转到新网页打开,原网站不变呢,就是新弹出网页

方案

  • 黄老邪 #1 · 2019-05-23 18:13:46
    发代码,我在基础上给你改,一句而已
  • 命运一切皆随缘 #2 · 2019-05-23 18:15:10
    {if $t.tid==2} target="_blank"{/if}
  • master888 #3 · 2019-05-23 18:16:11
    命运一切皆随缘哦哦,对的,忘记这样写了,谢谢
  • master888 #4 · 2019-05-23 18:21:17
    命运一切皆随缘 <li><a href="/">首页</a> </li> {category module=share pid=0} <li class="menu-item-has-children"><a href="{$t.url}">{$t.name}</a> {if $t.child} <ul class="sub-menu"> {category module=share pid=$t.id return=t2} <li><a {if $t2.id==18} target="_blank"{/if} href="{$t2.url}"> {$t2.name}</a></li> {/category} </ul> {/if} </li> {/category}这样写没问题啊,怎么不生效呢
  • master888 #5 · 2019-05-23 18:25:44
    <li><a {if $t2.id==18} target="_blank"{/if} href="{$t2.url}">
  • master888 #6 · 2019-05-23 18:26:01
    <li><a {if $t2.id==18} target="_blank"{/if} href="{$t2.url}"> master888这样不生效,怎么回事呢
  • 黄老邪 #7 · 2019-05-23 18:28:20
    {if $t2.tid==2} target="_blank"{/if}
    第二成你是t2不是t,眼力劲不行
  • master888 #8 · 2019-05-23 18:32:58
    黄老邪我return的就是t2啊
  • master888 #9 · 2019-05-23 18:38:47
    命运一切皆随缘求教啊,是哪里出错了吗
  • master888 #10 · 2019-05-23 18:41:08
    黄老邪<li><a {if $t2.id==18} target="_blank" {/if} href="{$t2.url}"> {$t2.name}</a></li>我是这样写的,不生效
  • 黄老邪 #11 · 2019-05-23 18:42:47
    {if $t2.tid==2} target="_blank"{/if}
    这样写就对了,改18是无效的
  • master888 #12 · 2019-05-23 18:45:36
    黄老邪不是的,我就是要栏目id为18的栏目做外链,然后跳转到新页面
  • PHP码农 #13 · 2019-05-23 18:47:01
    {if $t2.tid==2}  是外链 {/if}
    很厉害的写法
  • master888 #14 · 2019-05-23 18:48:05
    黄老邪我知道你意思是说选择栏目类型为外链的做跳转,其实是一个意思,我两种方法都试过,不生效
  • master888 #15 · 2019-05-23 18:48:58
    PHP码农刚试过,也不生效
  • master888 #16 · 2019-05-23 18:52:45
    能不能在外链地址上做修改呢
  • 黄老邪 #17 · 2019-05-23 18:54:40
    满意答案
    <li><a target="_blank" href="/">首页</a> </li>
    											 {category module=share pid=0}
    											<li class="menu-item-has-children"><a {if $t.tid==2} target="_blank"{/if}  href="{$t.url}">{$t.name}</a>
    											  {if $t.child}
    												<ul class="sub-menu">
    												 {category module=share pid=$t.id return=t2}
    													<li><a {if $t2.tid==2} target="_blank"{/if} href="{$t2.url}"> {$t2.name}</a></li>
    													  {/category}
    													
    												</ul>
    												  {/if}
    											</li>
    												 {/category}

    写法没问题啊,老大都说可以

  • master888 #18 · 2019-05-23 19:16:58
    我晚点再看看,线上修改了半天,会不会缓存呢
  • 苏小闵 #19 · 2019-05-23 20:47:25

    image.png
  • master888 #20 · 2019-05-24 09:41:48
    我服了,在本地环境测试能跳转到新页面,怎么服务器上的就跳转不了,还是原网页跳转啊,刚更新到最新版本4.2.5了,还是不行,求解惑
  • master888 #21 · 2019-05-24 18:01:39
    @黄老邪:是我的问题,解决了,谢谢

迅睿系统漏洞

站群分站系统
站群分站系统(2026-10-15)
子站域名新增llms.txt访问
GEO系统
GEO系统(2026-10-14)
修复下载zip空白地址问题 修复流量复刻和任务队列错误
GeoSeo收录宝
GeoSeo收录宝(2026-10-14)
新增 站长工具箱 前端首页自动调用meta 数据
滑块验证码 Gocaptcha
滑块验证码 Gocaptcha(2026-10-13)
基于开源项目 go-captcha 的行为验证码插件,滑动拼图、区域...
GeoSeo工具箱
GeoSeo工具箱(2026-10-13)
优化巡检任务
GeoSeo排名助手
GeoSeo排名助手(2026-10-11)
加入大模型自定义
SEO聚合关键字
SEO聚合关键字(2026-10-11)
优化关键字列表页最多支持1万篇文章,过多会导致服务器扛不住;
CMS内容同步复制
CMS内容同步复制(2026-10-10)
增加时间是否更新的开关