Views - Add a CE block display

Created on 17 April 2023, about 1 year ago
Updated 28 April 2023, about 1 year ago

This MR adds a new "Custom Elements Block" Views display class.

This is useful if you want to place a Views block leveraging lupus_decoupled_blocks.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Dan.Ashdown

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Dan.Ashdown
  • @danashdown opened merge request.
  • Status changed to Needs review about 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom Dan.Ashdown
  • First commit to issue fork.
  • Status changed to Needs work about 1 year ago
  • πŸ‡¦πŸ‡ΉAustria fago Vienna

    Tested this, but it's not fully working yet.

    I've tried to improve the code so the block provides a proper CE response. When done so the block rendering should pick up the CE wrapped in the render-array. But it seems the views/block rendering pipeline wraps the render array somewhere, so it ends up markup instead of json still.

    "views_block__teasers_custom_elements_block_1": "<drupal-markup><div class=\"views-element-container contextual-region\"><drupal-block-view display-id=\"custom_elements_block_1\" pager=\"{&quot;total_pages&quot;:2,&quot;current&quot;:0}\"><node type=\"article\" view-mode=\"teaser\" title=\"Abico At Bene Jus Utrum\" created=\"1682611419\" slot=\"rows\"><div slot=\"body\"><p>Conventio jumentum luptatum nobis pecus proprius singularis ulciscor. Conventio genitus iustum nobis ulciscor vulputate. Dolor dolore dolus ibidem singularis. Causa gilvus ille macto os valde.</p>\n<p>Immitto iriure melior sed venio vindico. Elit importunus pneum quidem torqueo vel. Amet distineo hendrerit illum iriure jugis sino valetudo. Accumsan haero modo praemitto saepius. Distineo erat inhibeo roto verto virtus. Aliquam natu neo nulla tum velit vero. Antehabeo appellatio gilvus humo ibidem uxor vulputat

  • @fago opened merge request.
Production build 0.69.0 2024