你好,我有一个子导航
lib.subnavigation = COA
lib.subnavigation {
10 = HMENU
10 {
entryLevel = 2
1 = TMENU
1 {
expAll = 1
NO {
doNotLinkIt = 1
#wrapItemAndSub = <li>|</li>
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
typolink.parameter.field = uid
typolink.additionalParams.insertData = 1
field = title
#wrap = <span>|</span>
stdWrap.htmlSpecialChars = 1
}
# 4 = shortcut
4 = TEXT
#4.wrap = <span>|</span>
4 {
field = title
typolink.parameter.field = shortcut
typolink.ATagBeforeWrap = 1
}
# 3 = external url
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
}
}
}
ACT = 1
ACT {
doNotLinkIt = 1
#wrapItemAndSub = <li class="home-lnk active">|</li>
stdWrap.cObject = COA
stdWrap.cObject {
1 = TEXT
1.wrap = <a href="
1.typolink.parameter.data = field:uid
1.typolink.returnLast = url
2 = TEXT
2.wrap = " class="active">
3 = TEXT
3.data = field:title
4 = TEXT
4.wrap = </a>
}
}
}
}
我需要在HTML模板中获得指向父页面的链接,我该怎么做?通过什么变量可以获得指向父页面的链接?
我的html模板:
<f:layout name="DefaultLayout" />
<f:section name="content">
<f:format.raw>{content_100}</f:format.raw>
<div class="page-title-wrap">
<div class="container">
<div class="page-title">Regionalstelle <f:format.raw>{pagetitle_sub}</f:format.raw></div>
</div>
</div>
<div class="mnu-third-wrap">
<div class="container">
<div class="mnu-third">
<f:format.raw>{subnavigation}</f:format.raw>
</div>
</div>
</div>
<f:format.raw>{content_0}</f:format.raw>
</f:section>
变量子导航包含到子菜单的所有链接。 我需要制作一个指向父页面的页面标题链接,谢谢您的提前帮助。
答案 0 :(得分:0)
如果在TS中将typolink.parameter.field = uid
替换为typolink.parameter.field = pid
怎么办
答案 1 :(得分:0)
根据上下文,您始终拥有data
记录。对于contentlements,它是tt_content记录,对于页面,它是pages
。
当前页面的父级可以通过字段pid
(页面/父ID)来标识。
因此您可以建立指向父页面的链接,例如:
<f:link.page pageUid="{data.pid}">parent page</f:link.page>