草芽学习网提供织梦建站和织梦仿站培训,从零基础讲解DEDECMS程序建站和DEDE仿站方法!

dede手机站仿站标签大全

作者:草芽学习网 来源:织梦百科
dede手机端仿站标签合集 PC跳转标签 首页跳转 meta name=mobile-agent content=format=xhtml;url=http://m.dadongjie.com/ script type=text/javascript if (window.location.toString().indexOf(pref=padindex) != -1) {} else { if (/Appl

dede手机端仿站标签合集

 

PC跳转标签

首页跳转

 

<meta name="mobile-agent" content="format=xhtml;url=http://m.dadongjie.com/">

    <script type="text/javascript">

    if (window.location.toString().indexOf('pref=padindex') != -1) {} else {

        if (/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))) {

            if (window.location.href.indexOf("?mobile") < 0) {

                try {

                    if (/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {

                        window.location.href = "http://m.dadongjie.com/";

                    } else if (/iPad/i.test(navigator.userAgent)) {} else {}

                } catch (e) {}

            }

        }

    }

    </script>

 

列表跳转

 

<meta name="mobile-agent" content="format=xhtml;url=http://m.dadongjie.com/list.php?tid={dede:field.id/}">

<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="http://m.dadongjie.com/list.php?tid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>

 

内容跳转

 

<meta name="mobile-agent" content="format=xhtml;url=http://m.dadongjie.com/view.php?aid={dede:field.id/}">

<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="http://m.dadongjie.com/view.php?aid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>

 

三大标签

首页

 

<title>{dede:global.cfg_webname/} - 手机版</title>

<meta name="keywords" content="{dede:global.cfg_keywords/}" />

<meta name="description" content="{dede:global.cfg_description/}" />

 

列表页

 

<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>

<meta name="keywords" content="{dede:field.keywords/}" />

<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />

 

内容页

 

<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>

<meta name="keywords" content="{dede:field.keywords/}" />

<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />

 

循环标签

导航循环

 

<ul>

    <li> <a href="index.php">首页</a></li>

    {dede:channel type='top' row='10'}

    <li> <a href="list.php?tid=[field:id/]">[field:typename/]</a></li>

    {/dede:channel}

</ul>

 

包含标签:

 

[field:id/]:栏目编号

 

[field:typename/]:栏目名称

 

新闻循环

 

<ul class="lee">

    {dede:arclist row='5'}

    <li>

        <a href="view.php?aid=[field:id/]">

            <img src="[field:litpic/]">

            <p>[field:title /]</p>

        </a>

    </li>

    {/dede:arclist}

</ul>

 

包含标签:

 

[field:id/]:内容id(注意区别前面是view.php,还是list.php)

 

[field:litpic/]:图片地址

 

[field:title /] :内容标题

本文地址:https://www.caoyaedu.com/dedebk/129.html