[field:link /]"; then change "
  • " Just remove it."/> [field:link /]"; then change "
  • " Just remove it.">

    Home >CMS Tutorial >DEDECMS >How to modify the style of the DreamWeaver friendly link module

    How to modify the style of the DreamWeaver friendly link module

    藏色散人
    藏色散人Original
    2019-11-15 10:17:202529browse

    How to modify the style of the DreamWeaver friendly link module

    How to modify the style of the DreamWeaver friendship link module?

    Recently, I encountered some problems when receiving a new website. The website wants to modify the module of friendly links. We use a template of Dream Weaver, and this problem is also The problem encountered by most students is to modify the underlying style of the template, such as flink friendly link module

    Picture:

    {dede:flink row=’24′ type=’image’ titlelen=”24″ typeid=”0″}

    Underlying tag [field:link /

    {/dede :flink}

    Text:

    {dede:flink row=’24′ type=’text’ titlelen=”24″ typeid=”0″}

    Underlying label [field:link /]

    {/dede:flink}

    row='24′ means reading 24, if row is not set, then The default is 24,

    titlelen=”24″ means that the friendly link is in text form, the website name has a width of 24 characters, the website encoding is GBK, which is 12 Chinese characters, and the website encoding is UTF-8, which is 8 Chinese characters.

    typeid=”0″ 1 Comprehensive website 2 Entertainment 3 Education 4 Computer 5 E-commerce 6 Online information 7 Forum 8 Other types If typeid=”0″ or not filled in, all types will be read.

    type=’image’
    type=’text’

    dede Friendly Link Tag Knowledge

    When imitating the website, Dreamweaver CMS default friendly link tag {dede:flink row='24'}, by default the underlying template will generate 2248ef50c8e644a864b657cb42ea37c0What about styles? How to remove this default style? Didn't find it in the homepage template? In fact, this underlying template is written in the flink.lib.php file.

    Open the /include/taglib/flink.lib.php file and find:

    if(trim($ctag->GetInnerText())==&#39;&#39;) $innertext = "<li>[field:link /]</li>";

    Just remove 25edfb22a4f469ecb59f1190150159c6bed06894275b65c1ab86501b08a632eb.

    There is also a simpler method, which is to directly use the str_replace function to replace in the tag.

    The code is:

    {dede:flink row=&#39;24&#39; function="(str_replace(array(&#39;<li>&#39;,&#39;</li>&#39;),&#39;&#39;,@me))"/}

    Just everyone should pay attention to the fact that array is an array. Similarly, this method can be applied to many places. It is also a relatively important function in php. Therefore, everyone must pay attention to such issues when using it.

    The above is the detailed content of How to modify the style of the DreamWeaver friendly link module. 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