From 7c842808cf322b14b73d16eda4bb76c2d19dadae Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 29 Aug 2026 21:40:12 +0000 Subject: [PATCH] Fall back to newsletter CTA when a post has no related product The "Passend dazu" slot went empty for most posts (only 1 of 12 has relatedProduct set), leaving /newsletter with no incoming link anywhere on the site despite being a fully built page. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8 --- app/blog/[slug]/page.tsx | 61 +++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index 60d077a..cce73ea 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -125,16 +125,21 @@ export default async function BlogDetailPage({ {/* "Passend dazu" — per-post CMS content now (Posts.relatedProduct), - not a hardcoded flagship-product link. Hidden entirely if the - post has no related product, or that product has no detail - page to send "Entdecken" to. Matches the actual built Figma - frame exactly (node 4674:349, fetched via get_design_context) — - 1px border-border, rounded-md, px-9/py-7 padding; an earlier - version guessed a plain borderless row instead, which - get_metadata's structural dump didn't reveal (frame-level - stroke/padding/radius aren't visible there, only - get_design_context shows those). */} - {post.relatedProduct?.href && ( + not a hardcoded flagship-product link. If the post has no + related product (or that product has no detail page to send + "Entdecken" to), falls back to a "Nicht verpassen" newsletter + card instead of leaving this slot empty — /newsletter had no + incoming link anywhere in the site despite being a fully + built page (WERKZEUGE_ROUTES and TestimonialsPage already + treated it as a first-class destination), and blog readers + are exactly its target audience. Matches the actual built + Figma frame exactly (node 4674:349, fetched via + get_design_context) — 1px border-border, rounded-md, + px-9/py-7 padding; an earlier version guessed a plain + borderless row instead, which get_metadata's structural dump + didn't reveal (frame-level stroke/padding/radius aren't + visible there, only get_design_context shows those). */} + {post.relatedProduct?.href ? ( + ) : ( + +
+ +
+
+

Nicht verpassen:

+
+
+

+ Wöchentliche Impulse +

+

+ Jeden Mittwoch neue Denkanstöße direkt ins Postfach – kostenlos, jederzeit abbestellbar. +

+
+ + Abonnieren + + +
+
+ )}