Jump to content

[SOLVED] Change block cms info link in top menu


5haun

Recommended Posts

  • 1 month later...

Okay I found a fix:

In modules/blocktopmenu/blocktopmenu.php replace

    case 'CMS_CAT':
    $category = new CMSCategory((int)$id, (int)$id_lang);
    if (count($category))
    {
    $this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>';
    $this->getCMSMenuItems($category->id);
    $this->_menu .= '</li>'.PHP_EOL;
    }
    break;

With

case 'CMS_CAT':
    $category = new CMSCategory((int)$id, (int)$id_lang);
    if (count($category))
    {
        if($category->id === 1){
	    $this->_menu .= '<li><a href="'.__PS_BASE_URI__.'">'.$category->name.'</a>';
	}else{
	    $this->_menu .= '<li><a href="'.$category->getLink().'">'.$category->name.'</a>';	
	}
	$this->getCMSMenuItems($category->id);
	$this->_menu .= '</li>'.PHP_EOL;
    }
break;
Link to comment
Share on other sites

hello

thank you for posting solution

i marked topic title as [solved]

 

 

[sOLVED] Topic
If, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.
Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.
Link to comment
Share on other sites

×
×
  • Create New...