dedecmsHow to add a drop-down menu to a friendly link?
1) Implementation method
Find /include/taglib/flink.lib.php, find else if($type=='image'), and add the line above it:
Recommended learning: Dream Weaver cms
The code is as follows:
else if($type=='option') { $link = "<option value='".$dbrow->url."'>".cn_substr($dbrow->webname,$titlelen)."</option>"; }
2) Calling method
Collapse and expand XML/HTML
The code is as follows:
<select onchange="window.open(this.options[this.selectedIndex].value,'_blank')"> <option>--相关链接地址--</option> {dede:flink row='24' type='option'/} </select>
3) Brief description
1. This extension retains all the functions of the original DedeCMS friendly link;
2. _blank is the opening method of the link. You can change it according to actual needs.
The effect is as follows:
The above is the detailed content of How to add drop-down menu to dedecms friendly link. For more information, please follow other related articles on the PHP Chinese website!