Home >CMS Tutorial >DEDECMS >Use of tags in dedecms

Use of tags in dedecms

(*-*)浩
(*-*)浩Original
2019-11-02 15:22:442107browse

Use of tags in dedecms

First you need to download the compressed package of dedecms and then decompress it. After doing some operations, when making a website, there is usually navigation.

So how to display the navigation page in dedecms (recommended learning: dedecms tutorial)

(1) If it is a first-level navigation, the code As follows

<ul>
                                {dede:channel}
                                    <li><a href="[field:typelink/]">[field:typename/]</a></li>
                                {/dede:channel}
                                </ul>

(2) If it is a secondary navigation, the code is as follows

{dede:channelartlist type="top" typeid="top"}
                            
  • {dede:field name='typename'/} <ul> {dede:channel} <li><a href="[field:typelink/]">[field:typename/]</a></li> {/dede:channel} </ul>
  • {/dede:channelartlist}

    2. If the page is linked, the dedecms code that needs to be used is as follows

    {dede:include filename="head.htm"/}

    3. If you want to display the picture

    <img src="{dede:global.cfg_templets_skin/}/img/logo.png" alt="" />

    4. If you want to display the page, the code is as follows

             <div class="col-md-5 col-sm-5 col-xs-12 pd0">
                            <div class="slide_text">
                                <h2 class="slide_title">{dede:type typeid="44"}[field:typename /]{/dede:type}</h2>
                                <p class="slide_ptext">{dede:sql sql="SELECT content FROM zz_arctype where id=44"}[field:content function=&#39;cn_substr(@me,400)&#39;/]...{/dede:sql}</p>
                                <a href="{dede:type typeid=&#39;44&#39;}[field:typelink /]{/dede:type}" class="slide_readmore">详细信息</a>
                            </div>
                        </div>

    The above is the detailed content of Use of tags in dedecms. For more information, please follow other related articles on the PHP Chinese website!

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn