[英]Typo3 extbase - HMENU with multiple records
I have a products extension with a "Details" view. 我有一个带有“详细信息”视图的产品扩展。 "Product" records are kept in a folder with ID 5. When I am on a product I want to have a menu with links to all the products from that folder. “产品”记录保存在ID为5的文件夹中。当我使用某个产品时,我想要一个菜单,该菜单具有指向该文件夹中所有产品的链接。 I this possible in Typoscript? 我能在Typoscript中吗?
Thank you. 谢谢。
You can do everything using TypoScript :-). 您可以使用TypoScript :-)进行所有操作。
lib.productList = CONTENT
lib.productList {
table = tx_myext_domain_model_product
select {
# sorting criterion
orderBy = tstamp DESC
# PID list
pidInList = 46,47
# Maybe restrict the number of results
max = 20
}
# Each result must be rendered like this
renderObj = COA
renderObj {
1 = TEXT
# Each field from your table can be used
1.field = title
1.wrap = <h1>|</h1>
2 = TEXT
2.field = description
# If one field contains rich text, you can apply RTE parsing to it
2.parseFunc < lib.parseFunc_RTE
}
}
Now you can use the cObject ViewHelper to display your list in the Fluid template: 现在,您可以使用cObject ViewHelper在Fluid模板中显示列表:
<f:cObject typoscriptObjectPath="lib.productList"></f:cObject>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.