Home > CMS Tutorial > DEDECMS > body text

How to open the external link column of DreamWeaver CMS navigation in a new window

(*-*)浩
Release: 2019-12-13 15:21:23
Original
2245 people have browsed it

How to open the external link column of DreamWeaver CMS navigation in a new window

I recently encountered a problem, that is, the navigation of dedecms uses external links, but the original window does not look good when opened, and it is better to open a new window.

OK, Put Dog ... : (Recommended Learning: Weaving Dream CMS )

The following is a simple dede tag code. If there is any deficiencies, please give me some advice

Find the head.htm in the template and replace

<li><a href=&#39;[field:typeurl/]&#39;>[field:typename/]</a></li>
Copy after login

with the following

<li>
<a href=&#39;[field:typeurl/]&#39; [field:id runphp=&#39;yes&#39;] if(@me==&#39;4&#39;){ @me="target=&#39;_blank&#39;";} else {@me="";}[/field:id]>
    [field:typename/]
</a>
</li>
Copy after login

Note: The 4 above is the ID of the column you want to open a new window, just write it like this.

If there are multiple, you can write them all at once. If there are 2 new windows that need to be opened, the code is as follows

<li>
<a href=&#39;[field:typeurl/]&#39; [field:id runphp=&#39;yes&#39;] if(@me==&#39;4&#39;||@me==&#39;5&#39;){ @me="target=&#39;_blank&#39;";} else {@me="";}[/field:id]>
<span>[field:typename/]</span>
</a>
</li>
Copy after login

Here are the IDs of 4 and 5. All new windows will be opened, OK!

The above is the detailed content of How to open the external link column of DreamWeaver CMS navigation in a new window. 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!