Home > CMS Tutorial > DEDECMS > body text

How to modify the style of the DreamWeaver friendly link module

藏色散人
Release: 2019-11-15 10:17:20
Original
2420 people have browsed it

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″}
Copy after login

Underlying tag [field:link /

{/dede :flink}

Text:

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

Underlying label [field:link /]

{/dede:flink}
Copy after login

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’
Copy after login

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 What 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>";
Copy after login

Just remove

  • .

    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))"/}
    Copy after login

    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!

    Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!