Home  >  Article  >  CMS Tutorial  >  How to open the external link column of DreamWeaver CMS navigation in a new window

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

(*-*)浩
(*-*)浩Original
2019-12-13 15:21:232297browse

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>

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>

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>

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!

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