【问题标题】:How to add title to breadcrumb from the database of extention in typo3?如何从typo3中的扩展数据库中为面包屑添加标题?
【发布时间】:2012-12-13 11:31:45
【问题描述】:

使用 kickstart,我为列出类别和产品创建了一个扩展。我需要在我的面包屑中显示类别标题/名称和产品标题/名称。目前我编码用于从数据库调用(“40 = RECORDS” ) 它只显示

结果:- 主页 > 页面名称 »

我的网址:-http://www.domain.com/page_name/

       lib.breadcrumb=COA
       lib.breadcrumb {
        40 = RECORDS
        40 {
             dontCheckPid = 1
             tables = TABLE_NAME
             source.data = GPvar:tx_pi1_NAME|EXTKEY
             conf.EXTKEY = TEXT
             conf.EXTKEY.field = FIELD_NAME
             wrap =  »  |
           }


          10 = HMENU
          10 {
              special = rootline
       # "not in menu pages" should show up in the breadcrumbs menu
      includeNotInMenu = 1
           1 = TMENU
             # no unneccessary scripting.
           1.noBlur = 1
             # Current item should be unlinked
           1.CUR = 1
           1.target = _self
           1.wrap = <div class="breadcrumb-class"> | </div>
           1.NO {
             stdWrap.field = title
             ATagTitle.field = nav_title // title
             linkWrap = ||*| > |*|
            }
             # Current menu item is unlinked
           1.CUR {
             stdWrap.field = title
             linkWrap = ||*| &nbsp>&nbsp&nbsp |*|
             doNotLinkIt = 1
           }

          }

}

【问题讨论】:

    标签: typo3 breadcrumbs typoscript


    【解决方案1】:

    这是来自新闻扩展的示例。您可以对扩展使用相同的方法。

    http://forge.typo3.org/projects/extension-news/wiki/Add_news_to_breadcrumb_menu

    【讨论】:

    • 是的,谢谢,我使用了无法正常工作的代码。它没有显示在任何交战或错误中。它在一种情况下处于活动状态。
    【解决方案2】:

    我们可以从我们在typo3中创建的任何扩展的数据库中将字段标题添加到面包屑。

    lib.breadcrumb = COA
    lib.breadcrumb {
        stdWrap.wrap = <ul class="breadcrumb">|</ul>
        entryLevel = 1
    
        10 = HMENU
        10 {
             special = rootline
    
            1 = TMENU
            1 {
                noBlur = 1
    
                NO = 1
                NO {
                    wrapItemAndSub = <li>|</li>
                    ATagTitle.field = subtitle // title
                    linkWrap = ||*|&nbsp;&rsaquo;&nbsp |*|
                    stdWrap.htmlSpecialChars = 1
                }
    
                CUR <.NO
                CUR {
                    wrapItemAndSub = <li class="active">|</li>
                }
            }
        }
    
        101=RECORD
        101 {
            tables = tx_table_name
            source.data =  GPvar:tx_plugin_name|param  //param passing in the url
            conf.tx_besiproduct_product = TEXT
            conf.tx_besiproduct_product.field = field_name
            conf.tx_besiproduct_product.required = 1
            conf.tx_besiproduct_product.wrap =  <li >|</li>
         }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-25
      • 1970-01-01
      相关资源
      最近更新 更多