Content blocks: Shown in the page, the card only, or both (migration 071)
A card block also showed on the record's page (the pages printed the card's paragraphs above the body), which the editor didn't say. Shown in now offers The page, The card only, and The card and the page. Every existing card block becomes both, so nothing on the site moves; the pages no longer print card paragraphs, and a both block comes with the page's blocks, in its place in the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b55b088e16
commit
8d6bb8c2b8
10 changed files with 103 additions and 32 deletions
|
|
@ -75,7 +75,7 @@ function firstParagraphs(db, rows) {
|
|||
`SELECT owner_id, text FROM (
|
||||
SELECT owner_id, text, ROW_NUMBER() OVER (PARTITION BY owner_id ORDER BY sort_order) AS n
|
||||
FROM content_blocks
|
||||
WHERE owner_kind = 'blog_post' AND slot = 'body' AND type = 'paragraph'
|
||||
WHERE owner_kind = 'blog_post' AND slot IN ('body', 'both') AND type = 'paragraph'
|
||||
AND text IS NOT NULL AND text <> ''
|
||||
AND owner_id IN (${marks(ids.length)})
|
||||
) WHERE n = 1`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue