不知道怎么回事 一加二級分類就報錯
{category module=share pid=0}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle {if IS_SHARE && $catid && in_array($catid, $t.catids)} active{/if}" href="{$t.url}" id="navbar3" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{$t.name} {if $t.child}<i class="fa fa-angle-down"></i>{/if}</a>
{if $t.child}
<div class="dropdown-menu" aria-labelledby="navbar3">
{category module=share pid=$t.id return=t2}
<a class="dropdown-item " href="">{$t.name}</a>
{/category}
</div>
{/if}
</li>
{/category}
syntax error, unexpected '"'
#SQL:SELECT * FROM `dr_member_group_index` WHERE `uid` = 1
#URL:http://www.hai888life.com/
#REFERER:http://www.hai888life.com/admin.php
#0 /www/wwwroot/www.hai888life.com/dayrui/Fcms/Core/View.php(230): include()
#1 /www/wwwroot/www.hai888life.com/dayrui/Core/Controllers/Home.php(18): PhpcmfView->display('index.html')
#2 /www/wwwroot/www.hai888life.com/dayrui/Core/Controllers/Home.php(26): PhpcmfControllersHome->_index()
#3 /www/wwwroot//www.hai888life.com/dayrui/System/CodeIgniter.php(918): PhpcmfControllersHome->index()
#4 /www/wwwroot/www.hai888life.com/dayrui/System/CodeIgniter.php(404): CodeIgniterCodeIgniter->runController(Object(PhpcmfControllersHome))
#5 /www/wwwroot/www.hai888life.com/dayrui/System/CodeIgniter.php(312): CodeIgniterCodeIgniter->handleRequest(NULL, Object(ConfigCache), false)
#6 /www/wwwroot/www.hai888life.com/dayrui/Fcms/Init.php(353): CodeIgniterCodeIgniter->run()
#7 /www/wwwroot/www.hai888life.com/index.php(47): require('/www/wwwroot/ww...')
#8
官方提醒:使用category欄目循環(huán)標(biāo)簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋
去掉會不會
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人 去掉什么?
去掉上面的標(biāo)簽會不會報錯
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人 我重下今天發(fā)的新版,直接復(fù)制導(dǎo)航部分,一樣提示錯誤。
去掉上面的標(biāo)簽會不會報錯,你沒有回答我的問題
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人 去掉以后,首頁導(dǎo)航出來了,所有的鏈接都報錯!
報什么錯呢
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人
這個區(qū)域的語法你寫錯了,你把這個div區(qū)域的標(biāo)簽發(fā)來看看,我給你分析分析
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
<ul class="navbar-nav ml-auto">
<li class="nav-item ">
<a href="{SITE_URL}" class="nav-link js-scroll-trigger {if $indexc}active{/if}">首頁 </a>
</li>
{category module=share pid=0}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle {if IS_SHARE && $catid && in_array($catid, $t.catids)} active{/if}" href="{$t.url}" {if $t.child} id="navbar3" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"{/if} >{$t.name} {if $t.child}<i class="fa fa-angle-down"></i>{/if}</a>
{if $t.child}
<div class="dropdown-menu" aria-labelledby="navbar3">
{category module=share pid=$t.id return=t2}
<a class="dropdown-item " href="">{$t2.name}</a>
{/category}
</div>
{/if}
</li>
{/category}
</ul>
原版沒動 任何東西呀!只是復(fù)制粘貼過來使用!
回復(fù)迅??蚣軇?chuàng)始人 沒有修改任何東西,只是按默認(rèn)模板格式修改!
你給的代碼不是你報錯的代碼,你報錯的代碼在這個div區(qū)域
你給我的代碼沒有問題的,不是報錯的地方,也就是你給錯我的代碼了
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)迅??蚣軇?chuàng)始人 發(fā)個網(wǎng)址 到你信箱可以不
發(fā)網(wǎng)址看不出問題,必須要看你報錯的這個div里面的代碼標(biāo)簽內(nèi)容,反正不是帖子的代碼,你沒給對代碼
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
{category module=share pid=0} <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle {if IS_SHARE && $catid && in_array($catid, $t.catids)} active{/if}" target="_blank" href="{$t.url}" id="navbar3" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{$t.name} {if $t.child}<i class="fa fa-angle-down"></i>{/if}</a> {if $t.child} <div class="dropdown-menu" aria-labelledby="navbar3"> {category module=share pid=$t.id return=t2} <a class="dropdown-item " target="_blank" href="">{$t.name}</a> {/category} </div> {/if} </li> {/category}這個代碼沒有錯,我復(fù)制你的代碼都o(jì)k
不知道什么原因,難道是下載的模板有問題,我重找個模板吧。今天更新了就出現(xiàn)這個狀況了。以前沒有出現(xiàn)過!謝謝老大的耐心回復(fù)!