Overview-Import: Why-VITEC-Karten als icon_card (0106-FE)
Der erste Lauf (5bm) legte die neuen Why-VITEC-Baender auf 9 Uebersichts- seiten als text_only an - das Frontend baut das Icon-Band nur aus icon_card. Importer legt neue Band-Karten jetzt als icon_card (ohne Icon) an und stellt vorhandene Band-Karten beim Re-Run um; 36 Karten repariert, Seiten gepurgt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
da2ca2690d
commit
5824981e2b
1 file changed
+10
-3
@@ -37,7 +37,10 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
* whose title matches the benefit heading (theme match
|
||||
* like vitec:build-why-vitec-bands), unmatched benefits
|
||||
* are REPORTED only (the band is the agency's icon set);
|
||||
* page without band: NEW band of text_only cards
|
||||
* page without band: NEW band of icon_card cards without
|
||||
* icon (0106-FE: the frontend builds the band from
|
||||
* icon_card only - text_only cards fall apart; a band
|
||||
* card still carrying text_only is repaired on re-run)
|
||||
* 04 COMPARISON -> skipped unless --comparison: the workbook holds no
|
||||
* specifications ("populate from approved datasheets"),
|
||||
* only the card descriptions again
|
||||
@@ -211,6 +214,10 @@ final class ImportProductOverviewWorkbooksCommand extends Command
|
||||
continue;
|
||||
}
|
||||
$used[(string)$match['uid']] = true;
|
||||
if ((string)$match['vitec_layout_variant'] !== 'icon_card') {
|
||||
// 0106-FE: band cards must be icon_card (first run wrote text_only)
|
||||
$this->update((string)$match['uid'], $match, ['vitec_layout_variant' => 'icon_card'], 'why card "' . $match['header'] . '" -> icon_card');
|
||||
}
|
||||
if (trim(strip_tags((string)$match['bodytext'])) !== '' && $this->norm(strip_tags((string)$match['bodytext'])) !== $this->norm($benefit['body'])) {
|
||||
$this->report[] = 'why: card "' . $match['header'] . '" already has own text - left as is';
|
||||
continue;
|
||||
@@ -222,11 +229,11 @@ final class ImportProductOverviewWorkbooksCommand extends Command
|
||||
$whyIds[] = $id;
|
||||
foreach ($wb['why']['benefits'] as $benefit) {
|
||||
$whyIds[] = $this->create($pageUid, 'vitec_card', [
|
||||
'vitec_layout_variant' => 'text_only',
|
||||
'vitec_layout_variant' => 'icon_card',
|
||||
'header' => $benefit['heading'],
|
||||
'bodytext' => $this->p($benefit['body']),
|
||||
'vitec_primary_cta_label' => '',
|
||||
], 'why: NEW card "' . $benefit['heading'] . '"');
|
||||
], 'why: NEW card "' . $benefit['heading'] . '" (icon_card, no icon)');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user