【问题标题】:Typolink with text带文字的排版链接
【发布时间】:2018-01-05 10:01:52
【问题描述】:

我有一个带有可变 src 值的简单文本元素。我想做的是围绕它做一个错字链接。

footerlogo = TEXT
footerlogo {
    value = {$footerlogo}
    wrap = <div class="elRightImg"><figure class="imageWr"><img src="|" alt="Footer Logo" style="max-width: 300px;"></figure><div class="clear"></div></div>
}

输出应如下所示:

<a href="http://www.example.com" class="myLink"><div class="elRightImg"> ... </div></a>

【问题讨论】:

  • 你也应该写下你的实际问题是什么。

标签: typo3 typoscript


【解决方案1】:

您要查找 typolink 函数及其属性 ATagBeforeWrap :)

footerlogo = TEXT
footerlogo {
  value = {$footerlogo}
  typolink.parameter = http://www.example.com
  typolink.wrap = <div class="elRightImg"><figure class="imageWr"><img src="|" alt="Footer Logo" style="max-width: 300px;"></figure><div class="clear"></div></div>
  typolink.ATagBeforeWrap  = 1 
}

应该可以。

文档:

https://docs.typo3.org/typo3cms/TyposcriptIn45MinutesTutorial/TypoScriptFunctions/Typolink/Index.html

https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Typolink/Index.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-20
    相关资源
    最近更新 更多