Skip to content

Frontend - Block Functions #353

@ZaredRogers

Description

@ZaredRogers

Description:

We need to implement several frontend functions to control block visibility and apply filters to custom fields. This includes ensuring blocks are not displayed if the custom field is empty and adding relevant filters for images, prices, and locations. We'll use CSS classes to manage block visibility.

Requirements:

Block Visibility:

  • If a custom field is empty, do not display the corresponding block.
  • Implement CSS classes to hide blocks where custom fields are empty.

Related Tasks:

  • Itinerary + Units (Bugherd: #66, #61, #60, #57)
  • Images (Bugherd: #53)
  • Custom Image (Bugherd: #45)
  • Price Filter (Bugherd: #54)
  • Location Formatting (Bugherd: #52)

Custom Field Filters:

  • Unit Price Rating (Bugherd: #51)
  • Transfer content prepending filters to custom fields (e.g., currency symbol).

Acceptance Criteria:

  • Blocks should not display if the related custom field is empty.
  • Proper CSS classes should be applied to hide blocks when necessary.
  • Custom fields like price, itinerary, units, and location should display correctly with appropriate filters.
  • All filters prepending content to custom fields should be transferred (e.g., currency symbol for price).

Additional Notes:

  • Ensure that any visibility changes do not affect page layout.
  • Test thoroughly across all block types to ensure blocks behave correctly when fields are empty.

Metadata

Metadata

Assignees

Labels

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions