Resolves a cascade of TYPO3 v14 breaking changes that left every VITEC plugin's JSON output silently empty: 1. `list_type` column dropped — all renderer page-discovery queries now filter by `CType = 'vitec_X'`. 2. `#[AsAllowedCallable]` attribute added to every public render() — without it v14 throws AllowedCallableException, which headless silently filters via its "Oops, an error occurred!" guard. 3. `$GLOBALS['TSFE']->id` is null inside JSON cObj context — page id now read from the `frontend.page.information` request attribute (TSFE fallback kept for legacy entry points). 4. page.tsconfig wizard items migrated to `CType = vitec_X` directly (legacy `CType=list, list_type=...` no longer exists in v14). 5. ContainerChildrenProcessor + ContentElementResolver dispatch the PLUGIN_RENDERERS map by CType (primary) with list_type fallback. Beyond the bug fix this commit also contains: - Datasheets renderer rewritten to "products with newest datasheet" semantics (filtered via Download.hideondatasheets). - New vitec/card content block — multi-purpose card with backend preview and layout/background/aspect/alignment/border/shadow options. - New vitec_container CType (b13 single-column container, FlexForm cssClass propagated into the JSON envelope). - ContentElementResolver service for contentelement/contentelementcta link resolution; ContainerChildrenProcessor for nested plugin resolution inside b13 containers. - Vitecset setup.typoscript: ContentElement import moved to top so lib.contentElement is defined before VITEC's tt_content blocks. - Cleanup: 98 .bak.<timestamp> debugging backups removed; *.bak.* and /public/_assets_install/ added to .gitignore.
187 lines
4.2 KiB
YAML
Executable File
187 lines
4.2 KiB
YAML
Executable File
name: vitec/card
|
|
group: vitec
|
|
prefixFields: true
|
|
prefixType: vendor
|
|
|
|
fields:
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
- identifier: tab_content
|
|
type: Tab
|
|
label: Content
|
|
|
|
- identifier: eyebrow
|
|
type: Text
|
|
max: 50
|
|
|
|
- identifier: header
|
|
useExistingField: true
|
|
required: true
|
|
|
|
- identifier: subheader
|
|
useExistingField: true
|
|
|
|
- identifier: bodytext
|
|
useExistingField: true
|
|
enableRichtext: true
|
|
|
|
- identifier: image
|
|
type: File
|
|
minitems: 0
|
|
maxitems: 1
|
|
allowed: common-image-types
|
|
|
|
- identifier: icon
|
|
type: File
|
|
minitems: 0
|
|
maxitems: 1
|
|
allowed: svg,png
|
|
|
|
- identifier: primary_cta
|
|
type: Link
|
|
allowedTypes:
|
|
- page
|
|
- url
|
|
- file
|
|
- email
|
|
|
|
- identifier: primary_cta_label
|
|
type: Text
|
|
max: 30
|
|
default: 'Learn more'
|
|
|
|
- identifier: secondary_cta
|
|
type: Link
|
|
allowedTypes:
|
|
- page
|
|
- url
|
|
- file
|
|
- email
|
|
|
|
- identifier: secondary_cta_label
|
|
type: Text
|
|
max: 30
|
|
|
|
- identifier: card_link
|
|
type: Link
|
|
allowedTypes:
|
|
- page
|
|
- url
|
|
- file
|
|
- email
|
|
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
- identifier: tab_layout
|
|
type: Tab
|
|
label: Layout
|
|
|
|
- identifier: layout_variant
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: vertical
|
|
items:
|
|
- label: Vertical (image top, content below)
|
|
value: vertical
|
|
- label: Horizontal (image left, content right)
|
|
value: horizontal
|
|
- label: Horizontal Reverse (content left, image right)
|
|
value: horizontal_reverse
|
|
- label: Image Overlay (text over image)
|
|
value: image_overlay
|
|
- label: Text Only (no image)
|
|
value: text_only
|
|
- label: Icon Card (icon focused, text below)
|
|
value: icon_card
|
|
- label: Feature (large highlighted card)
|
|
value: feature
|
|
- label: Compact (small card, tight spacing)
|
|
value: compact
|
|
|
|
- identifier: background_variant
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: none
|
|
items:
|
|
- label: None
|
|
value: none
|
|
- label: Orange
|
|
value: orange
|
|
- label: Blue
|
|
value: blue
|
|
- label: Graphite
|
|
value: graphite
|
|
- label: Midnight
|
|
value: midnight
|
|
- label: Light (neutral)
|
|
value: light
|
|
- label: Dark (neutral)
|
|
value: dark
|
|
|
|
- identifier: image_aspect_ratio
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: auto
|
|
items:
|
|
- label: Auto (original)
|
|
value: auto
|
|
- label: Square (1:1)
|
|
value: '1_1'
|
|
- label: Landscape (4:3)
|
|
value: '4_3'
|
|
- label: Widescreen (16:9)
|
|
value: '16_9'
|
|
- label: Portrait (3:4)
|
|
value: '3_4'
|
|
|
|
- identifier: text_alignment
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: left
|
|
items:
|
|
- label: Left
|
|
value: left
|
|
- label: Center
|
|
value: center
|
|
- label: Right
|
|
value: right
|
|
|
|
- identifier: border_style
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: none
|
|
items:
|
|
- label: None
|
|
value: none
|
|
- label: Soft (subtle line)
|
|
value: soft
|
|
- label: Hard (thick line)
|
|
value: hard
|
|
- label: Dashed
|
|
value: dashed
|
|
|
|
- identifier: shadow
|
|
type: Select
|
|
renderType: selectSingle
|
|
default: none
|
|
items:
|
|
- label: None
|
|
value: none
|
|
- label: Soft
|
|
value: soft
|
|
- label: Medium
|
|
value: medium
|
|
- label: Strong
|
|
value: strong
|
|
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
- identifier: tab_advanced
|
|
type: Tab
|
|
label: Advanced
|
|
|
|
- identifier: cssClass
|
|
type: Text
|
|
max: 100
|
|
|
|
- identifier: debug
|
|
type: Checkbox
|
|
default: 0
|