简体   繁体   English

TYPO3 9.5 LTS - 带有 routeEnhancers 的自定义 PAGE 类型的配置

[英]TYPO3 9.5 LTS - configuration for custom PAGE type with routeEnhancers

I have a vCard-solution that worked fine with TYPO3 version 8 and realURL but doesn't work with TYPO3 9.5.我有一个 vCard 解决方案,它适用于 TYPO3 版本 8 和 realURL,但不适用于 TYPO3 9.5。

vCard is triggered with an URL like: mywebsite.de/de/vcard.html?staffid=123&type=5000使用 URL 触发 vCard,例如:mywebsite.de/de/vcard.html?staffid=123&type=5000

Configuration:配置:

1) staffid=123 loads the values of staff member with ID 123 into the vCard: 1) staffid=123 将 ID 为 123 的员工的值加载到 vCard 中:

[globalVar = GP:staffid=123]
  VCARD_name = vcard-schneider-martin.vcf
  N_name = N:Schneider;Martin;;;Martin Schneider
  [...]
[global]

2) in order to load the special PAGE type the TypoScript is: 2) 为了加载特殊的 PAGE 类型,TypoScript 是:

vCard = PAGE
vCard {
  typeNum = 5000

  config {
    disableAllHeaderCode = 1
    additionalHeaders = Content-Type:text/x-vcard|Content-Disposition: attachment; filename="{$VCARD_name}"
    [...]
  }
}

How does the routeEnhancers (of config.yaml) has to be configured in order to make TYPO3 9.5 starting the vCard PAGE object with typeNum=5000 and render the vCard for the team member with the current value of GP variable "staffid" (from the URL)?为了使 TYPO3 9.5 启动 vCard PAGE object,typeNum=5000 必须如何配置 routeEnhancers(config.yaml),并使用当前值 GP 变量“staffid”为团队成员呈现 vCard网址)?

Thanks!谢谢!

I use this configuration for sitemap.xml with pageType 1533906435 and backslash für pageType 0 (section map of my config):我将此配置用于 sitemap.xml 和 pageType 1533906435 和反斜杠 für pageType 0(我的配置的 map 部分):

routeEnhancers:
    PageTypeSuffix:
        type: PageType
        default: /
        index: ''
        map:
            /: 0
            sitemap.xml: 1533906435

see also: https://usetypo3.com/xml-sitemap-in-typo3.html另见: https://usetypo3.com/xml-sitemap-in-typo3.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM