Typolink content in menu?

蹲街弑〆低调 提交于 2019-12-02 19:56:10

问题


I am trying to make a menu that displays the page's first content element header and image and have them be links. But the typolink part doesn't seem to work for me:

lib.menu = HMENU
lib.menu {
  1 = TMENU
  1.NO {
    doNotLinkIt = 1
    wrapItemAndSub = <div>|</div>
    stdWrap.cObject = CONTENT
    stdWrap.cObject {
      table = tt_content
      select {
        pidInList.field = uid
      }
      renderObj = COA
      renderObj {

        10 = TEXT
        10.field = header
        10.typolink.parameter.field = uid
      }
    }
  }
}

回答1:


Just to add give the full working example. Using section.field = uid you can link to the content element itself.

lib.menu = HMENU
lib.menu {
    1 = TMENU
    1.NO {
        doNotLinkIt = 1
        wrapItemAndSub = <div>|</div>
        stdWrap.cObject = CONTENT
        stdWrap.cObject {
            table = tt_content
            select {
                pidInList.field = uid
            }
            renderObj = COA
            renderObj {

                10 = TEXT
                10.field = header
                10.typolink {
                    parameter.field = pid
                    section.field = uid
                }
            }
        }
    }
}


来源:https://stackoverflow.com/questions/39112688/typolink-content-in-menu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!