2017-04-07 10 views
0

Localhostでは、About USについては、Contact US and Home Add Fieldを参照してください。 私は以下のコードを参照してくださいopencart 2.1.0.2でメニューフィールドを追加するには

<div class="collapse navbar-collapse navbar-ex1-collapse"> 
<ul class="nav navbar-nav">  
<?php foreach ($categories as $category) { ?> 
<?php if ($category['children']) { ?>  
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a> 
<div class="dropdown-menu"> 
<div class="dropdown-inner"> 
<?php foreach (array_chunk($category['children'], ceil(count($category['children'])/$category['column'])) as $children) { ?> 
<ul class="list-unstyled"> 
<?php foreach ($children as $child) { ?> 
<li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li> 
<?php } ?> 
</ul> 
<?php } ?> 
</div> 

答えて

0

を試してみてください、私はそれはあなたを助けホームmenu.Hopeためのリストタグを追加しています。

<div class="collapse navbar-collapse navbar-ex1-collapse"> 
    <ul class="nav navbar-nav"> 
     <li><a href="<?php ?>index.php?route=common/home">Home</a></li> 
     <?php foreach ($categories as $category) { ?> 
      <?php if ($category['children']) { ?> 
       <li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a> 
       <div class="dropdown-menu"> 
        <div class="dropdown-inner"> 
         <?php foreach (array_chunk($category['children'], ceil(count($category['children'])/$category['column'])) as $children) { ?> 
          <ul class="list-unstyled"> 
           <?php foreach ($children as $child) { ?> 
            <li><a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a></li> 
           <?php } ?> 
          </ul> 
         <?php } ?> 
        </div>