search
HomeCMS TutorialEmpire CMSHow to add nofollow to empire cms navigation

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(&#39;|&#39;,$class_r[$GLOBALS[navclassid]][featherclass]);
        $topbclassid=$fr[1]?$fr[1]:$GLOBALS[navclassid];
        if(($topbclassid==$s[classid])&&($ishome==0)){
        	$tclass=&#39;active&#39;;
        }
        $classurl=sys_ReturnBqClassname($s,9);      
        echo &#39;<li id="navbar-category-&#39;.$s[classid].&#39;" class="submenu li-cate-&#39;.$s[classid].&#39; &#39;.$tclass.&#39;"><a href="&#39;.$classurl.&#39;">&#39;.$s[classname].&#39;</a>&#39;;
        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.=&#39;<li id="navbar-category-&#39;.$s[classid].&#39;" class="li-cate-&#39;.$s[classid].&#39;"><a href="&#39;.$classurl2.&#39;">&#39;.$s2[classname].&#39;</a></li>&#39;;
            }
            echo &#39;<ul class="sub-menu">&#39;.$str.&#39;</ul>&#39;;
        }
        echo &#39;</li>&#39;;
    }
?>
      </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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.