Function 类型3:将当前菜单页uid作为参数传递给userFunc
如何将菜单页ID传递给自定义用户函数? 我需要它,以便我可以改变一些网页链接,这是无效的打字3。 它们将在另一个应用程序中解析Function 类型3:将当前菜单页uid作为参数传递给userFunc,function,menu,parameters,typoscript,Function,Menu,Parameters,Typoscript,如何将菜单页ID传递给自定义用户函数? 我需要它,以便我可以改变一些网页链接,这是无效的打字3。 它们将在另一个应用程序中解析 lib.test = HMENU lib.test { ... 1 = TMENU 1 { NO = 1 NO { # do not create a link here else there are double <a> tags doNotLinkIt = 1 stdWrap.c
lib.test = HMENU
lib.test {
...
1 = TMENU
1 {
NO = 1
NO {
# do not create a link here else there are double <a> tags
doNotLinkIt = 1
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
field = nav_title // title
typolink.parameter.field = uid
typolink.wrap = |<span><strong></strong></span>
typolink.ATagBeforeWrap = 1
stdWrap.htmlSpecialChars = 1
postUserFunc = user_productsOnCurrentPage->main
postUserFunc {
// not working
pageId.data = {page:uid}
pageId.insertData = 1
// also not working
pageId.field = uid
}
}
}
}
...
}
lib.test=humenu
自由测试{
...
1=t菜单
1 {
否=1
没有{
#不要在这里创建链接,否则会有双标记
doNotLinkIt=1
stdWrap.cObject=CASE
stdWrap.cObject{
key.field=doktype
默认值=文本
违约{
字段=导航标题//标题
typlink.parameter.field=uid
typlink.wrap=|
typlink.ATagBeforeWrap=1
stdWrap.htmlSpecialChars=1
posturefunc=user\u productsOnCurrentPage->main
姿势功能{
//不起作用
pageId.data={page:uid}
pageId.insertData=1
//也不起作用
pageId.field=uid
}
}
}
}
...
}
我可以在用户功能中直接访问页面ID:
打字稿:
typolink.userFunc = user_mcfazabosOnCurrentPage->main
PHP:
可能有解决您问题的方法:
在TMENU$cObj->data设置为每个菜单项的页面记录
因此,要传递hmenu“当前迭代”的页面uid,应执行以下操作:
postUserFunc.pageId.data = field:uid
归功于(德国)线程
postUserFunc.pageId.data = field:uid