簡體   English   中英

對於我的面包屑,magento 1.9.x中不存在錨鏈接

[英]For my bread crumbs anchor links are not present in magento 1.9.x

請看一下breadcrumbs.phtml的代碼:

    <?php if($crumbs && is_array($crumbs)): ?>
    <!-- SLIDER START HERE-->
    <div class="container">
      <div class="innerSlider relative">
        <div class="innerSlidercontent">
          <h2>“People with thyroid problems avoid eating millet on a daily basis 
      as it is believed to contain some”</h2>
        </div>
        <div class="insideSlidePic"> <img src="<?php echo $this-
       >  getSkinUrl('images/barnyard_millet_bisi_belle_bhaat_recipe.jpg'); ?>"  
      alt=""> </div>
      </div>
      <div class="clear"></div>
      <ul class="routeMenu">
        <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
            <li class="<?php echo $_crumbName ?>">
            <?php if($_crumbInfo['link']): 

               if($_crumbInfo['title']=="Home"){
                $_crumbInfo['link']=Mage::getUrl();
            }


            ?>
                <a class="sc_hover" href="<?php echo $_crumbInfo['link'] ?>" 
    title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>"><?php echo 
   $this->escapeHtml($_crumbInfo['label']) ?></a>
            <?php elseif($_crumbInfo['last']): ?>
                <span><?php echo $this->escapeHtml($_crumbInfo['label']) ?>
      </span>
            <?php else: ?>
                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>

            <?php endif; ?>
            </li>
        <?php endforeach; ?>
      </ul>
      </div>
      <div class="clear"></div>

      <!-- SLIDER END HERE-->
       <?php endif; ?>

幫助我弄清楚為什么面包屑中不存在錨鏈接,但文本即將到來。 在這里,我看到的代碼與其他面包屑代碼有些不同,那就是該代碼正確。

//替換下面的代碼,然后檢查或將文件替換為基本文件。

 <?php if($crumbs && is_array($crumbs)): ?>
    <!-- SLIDER START HERE-->
    <div class="container">
      <div class="innerSlider relative">

        <div class="innerSlidercontent">
          <h2>“People with thyroid problems avoid eating millet on a daily basis 
      as it is believed to contain some”</h2>
        </div>
        <div class="insideSlidePic"> <img src="<?php echo $this->getSkinUrl('images/barnyard_millet_bisi_belle_bhaat_recipe.jpg'); ?>"  
      alt=""> </div>
      </div>

      <div class="clear"></div>

      <ul class="routeMenu">
        <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
            <li class="<?php echo $_crumbName ?>">
            <?php if($_crumbInfo['link']): 

               if($_crumbInfo['title']=="Home"){
                $_crumbInfo['link']=Mage::getUrl();
            }
            ?>
                <a class="sc_hover" href="<?php echo $_crumbInfo['link'] ?>" 
    title="<?php echo $this->escapeHtml($_crumbInfo['title']) ?>"><?php echo 
   $this->escapeHtml($_crumbInfo['label']) ?></a>
            <?php elseif($_crumbInfo['last']): ?>
                <span><?php echo $this->escapeHtml($_crumbInfo['label']) ?>
      </span>
            <?php else: ?>
                <?php echo $this->escapeHtml($_crumbInfo['label']) ?>
            <?php endif; ?>
            <?php if(!$_crumbInfo['last']): ?>

            <?php endif; ?>
            </li>
        <?php endforeach; ?>
      </ul>
      </div>
      <div class="clear"></div>
      </div>

      <!-- SLIDER END HERE-->
       <?php endif; ?>

替代解決方案將基本文件復制到您的custon設計路徑,如下所示。

app/design/frontend/base/default/template/page/html/breadcrumbs.phtml

copy from base to your custom design path.

app/design/frontend/your-package/your-theme/template/page/html/breadcrumbs.phtml

請檢查默認的magento主題。我認為面包屑可以使用。 如果面包屑正在使用您的默認主題,請通過重命名布局和主題文件來檢查當前的自定義主題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM