주요 콘텐츠로 건너뛰기

Article collection page block

What's new

Page layouts accept a new block, ArticleCollectionBlock, which lists the pages of a collection. It sits next to LatestPagesBlock and takes the same selectors — collection_id, category_id, variant (linear or blur), is_paginated, and show_all_tab — plus a view_type of slider or grid that picks how the articles are laid out.

The block also joins the page_block union on AddPageBlockNode, so a page's graph_rules can insert one for a targeted audience.

Impact

An article collection can be rendered as a horizontal slider or as a grid from the same block, where LatestPagesBlock only offered a single layout and an is_featured flag.

Changes

ResourceChange
get_pages, get_page, create_page, update_page, bulk_update_page, translate_pageAdded ArticleCollectionBlock to the layout.blocks discriminator and oneOf
get_pages, get_page, create_page, update_page, bulk_update_page, translate_pageAdded ArticleCollectionBlock to the page_block union on AddPageBlockNode inside DynamicBlock.graph_rules
ComponentsAdded the ArticleCollectionBlock schema and the ArticleCollectionBlockViewType enum (slider, grid)

Upgrade

  • No action required. To use the block, add an entry to layout.blocks with block set to ArticleCollectionBlock.
  • Clients that validate page responses against a generated model should regenerate, since this block type can now appear in layout.blocks and in a parent page's layout.

도움이 필요하세요?
통합팀에 문의하십시오 [email protected]