0

So we have a section on our website (category menu) which was modified to include a custom menu system. in the file top.phtml i found the following code

<div >
        <?php //echo $_menu;
        echo $nf_menu;
        ?>
    </div>

The code inside the div's is calling for the menu, but i need to edit the actual code of the menu as it has inline styles for z-index applied to it and i need to adjust the z-index number.

Where would i find this menu. does that php code indicate where the file may be? Our coder is gone so we are not sure how they did this.

Matt Godwin
  • 23
  • 2
  • 11

1 Answers1

0

Based on the very limited information you've provided, there are basic ways of finding out where specific code is being generated in Magento (or any other scripting/php based framework).

  1. View the html source (output) of your menu in a browser and find a piece of the menu HTML that would be unique. An example can be a unique class name or something that will set it apart from everything else.

    <ul class="nf-menu">
       <li>...
    
  2. Do a site-wide file search for the unique reference you found in step 1. For example, search for <ul class="nf-menu"> or just nf-menu.

    Don't know how to search for text in a file? Use the resources you have available to learn how:

    For Linux based machines, see Finding all files containing a text string on Linux

    Or if you have the files locally, use an IDE program such as phpStorm or Dreamweaver that includes a folder search for files containing a string of text.

  3. Once you've found the file generating the code, simply make the modifications. I'd recommend making a backup of any file you modify so that you can revert to it if you're changes don't work as intended.

Community
  • 1
  • 1
Axel
  • 10,732
  • 2
  • 30
  • 43