在COA中创建带有参数和自定义名称的typolink

时间:2012-12-01 13:33:49

标签: typo3 typoscript typolink

我想从当前页面创建一个typolink,但是有其他名称和一些额外的GET参数。 E.g。

<a href="mytypo3site.com/this-is-the-current-side.html?someParam=1" title="My custom title">My custom name</a>

这是我的代码,只打印出带有MyCustomName的文本。

lib.tsfooter >
lib.tsfooter = COA
lib.tsfooter {
  10 = TEXT
  10.value (
   <!-- some HTML code-->
  )

  20 = TEXT
  20.value = MyCustomName
  20.stdWrap.typolink {
    data = TSFE:id
    addQueryString = 1
    addQueryString.method = get
    additionalParams = &myCustomParameter=1
  }
}

我做错了什么?

1 个答案:

答案 0 :(得分:4)

lib.tsfooter >
lib.tsfooter = COA
lib.tsfooter {
  10 = TEXT
  10.value (
   <!-- some HTML code-->
  )

  20 = TEXT
  20.value = MyCustomName
  # you do not need "stdWrap" as pgampe mentioned, but it will work even with stdWrap
  20.stdWrap.typolink {
    # parameter was missing
    parameter.data = TSFE:id
    addQueryString = 1
    addQueryString.method = get
    additionalParams = &myCustomParameter=1
  }
}