Home >CMS Tutorial >Empire CMS >How to add nofollow to empire cms navigation
If you want to know more about Empire cms, you can click: Empire cms tutorial
In the process of building our website and doing SEO, we do not need some insignificant columns (navigation), such as columns about us, contact information, etc., to participate in the ranking (because it is just a single page and will never be included in the ranking). Pages that will update content), so we will add nofollow to such pages to ensure that the weight of our homepage is not dispersed! However, the columns of Dreamweaver CMS are generally called uniformly. The original calling code is as follows. Many people will not add nofollow to a single column.
If you directly use the default navigation of the empire to modify it, It will be more complicated. My general method of operation is to change the navigation bar to a line of code written by hand, which means that the navigation bar is written by me. In this case, it will be easier for me to modify it. Generally speaking, our The navigation bar is fixed, so it’s okay not to write it.
Sample code
<li id="nvabar-item-index" class="<?=$homestyle?>"><a href="[!--news.url--]">首页</a></li> <?php $sql=$empire->query("select classid,classname,islast from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,myorder asc"); while($s=$empire->fetch($sql)){ $tclass=""; $fr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]); $topbclassid=$fr[1]?$fr[1]:$GLOBALS[navclassid]; if(($topbclassid==$s[classid])&&($ishome==0)){ $tclass='active'; } $classurl=sys_ReturnBqClassname($s,9); echo '<li id="navbar-category-'.$s[classid].'" class="submenu li-cate-'.$s[classid].' '.$tclass.'"><a href="'.$classurl.'">'.$s[classname].'</a>'; if(!$s[islast]){ $sql2=$empire->query("select classid,classname from {$dbtbpre}enewsclass where bclassid=$s[classid] and showclass=0 order by myorder,myorder asc"); $str=""; while($s2=$empire->fetch($sql2)){ $classurl2=sys_ReturnBqClassname($s2,9); $str.='<li id="navbar-category-'.$s[classid].'" class="li-cate-'.$s[classid].'"><a href="'.$classurl2.'">'.$s2[classname].'</a></li>'; } echo '<ul class="sub-menu">'.$str.'</ul>'; } echo '</li>'; } ?> </ul>
The above is the detailed content of How to add nofollow to empire cms navigation. For more information, please follow other related articles on the PHP Chinese website!