Skip to content

v2.3.0 - Bricks Builder Integration

Choose a tag to compare

@KarlosSchmidtos KarlosSchmidtos released this 30 Apr 12:51
· 42 commits to main since this release

Bricks Builder Integration

Opt-in custom Bricks element ImmoAdmin Units Table — render filterable, sortable, optionally accordion-style tables of property units directly in Bricks Builder.

Features

  • Free-form columns — repeater with conditional types (Text, Link, Image, Status Badge, HTML), each cell value is Bricks Dynamic Data
  • Native Bricks integration — external Filter and Pagination elements just work via the standard query trail mechanism
  • Optional Accordion mode — Nestable children slot lets designers build the expanded body freely (any Bricks elements)
  • Inline sort — click sortable column headers to re-sort rows client-side
  • Status awareness.is-available / .is-reserved / .is-sold row classes plus dim/hide modes
  • URL state?unit=ID opens the accordion and scrolls to the row; shareable links
  • Horizontal scroll toggle — for many-column layouts
  • German UI

Activation

Enable in plugin admin: Bricks Integration aktivieren. Element only registers when Bricks theme is active. Default off.

Quick Start (Bricks)

  1. Drag ImmoAdmin Units Table into your page
  2. Configure columns in the Settings panel — header text + Dynamic Data value (e.g. {cf_living_area_formatted})
  3. Optionally place Bricks Filter elements above and Pagination below — they auto-target this element
  4. If accordion mode is on, design the expanded body by dropping any Bricks elements into the slot

Common Dynamic Data Tags

  • {cf_building_name} Haus
  • {cf_door_number} Top
  • {cf_floor_label} Geschoss
  • {cf_room_count} Zimmer
  • {cf_living_area_formatted} Wohnfläche
  • {cf_purchase_price_formatted} Kaufpreis
  • {cf_status} Status
  • {cf_image_1} ... {cf_image_N} Bilder
  • {cf_floor_plan_1} Grundriss
  • {cf_document_1_url} Exposé PDF

Technical Notes

  • Registers via \Bricks\Elements::register_element on init priority 11 (after Bricks base class loads)
  • Uses \Bricks\Query + render_query_loop_trail() for full Filter/Pagination AJAX compatibility
  • CSS scoped via @layer bricks + :where() for low specificity (theme-overridable)
  • JS wrapped in BricksFunction — survives Bricks AJAX swaps automatically

Files

  • bricks/elements/units-table.php (812 LOC)
  • bricks/assets/css/units-table.css (214 LOC)
  • bricks/assets/js/units-table.js (209 LOC)