織夢手機版原來的連接跳轉(zhuǎn)到迅睿CMS動態(tài)連接方法
適用于原來PC端靜態(tài),手機版是動態(tài)的網(wǎng)站。
下載附件m文件夾,放在根目錄,訪問織夢的view.php?aid=xxx就會301跳轉(zhuǎn)到index.php?c=show&id=xxx
PC端生成靜態(tài)的情況下,手機端的分頁可能也會采用靜態(tài)的連接,會報404,所以手機端的分頁調(diào)用得這樣寫
{module catid=$catid page=1 sbpage=1 urlrule=/index.php?c=category&id=$catid&page=[page]}
PC端跳轉(zhuǎn)到手機動態(tài)頁面的代碼
<script type="text/javascript">
try {
var urlhash = window.location.hash;
if (!urlhash.match("fromapp")) {
if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) {
window.location = "{SITE_URL}index.php?c=show&id={$id}";//跳轉(zhuǎn)的地址,現(xiàn)在是內(nèi)容頁的,列表也替換成index.php?c=category&id={$id},首頁去掉index.php后邊的參數(shù)就可以了
}
}
}
catch (err) {
}
</script>也可以直接訪問織夢的view.php?aid=xxx不跳轉(zhuǎn),參考 http://apdwn.com/wenda/43032.html ,如果無效的話,代碼里的index.php前邊加上../index.php
官方提醒:使用module內(nèi)容循環(huán)標(biāo)簽的生成工具,填寫參數(shù)就可以生成相關(guān)的代碼,每個參數(shù)后面都有用法解釋