Content

Last updated on Sep 16, 2025

Content Block

The Content block displays a single content item from your Tourismo admin platform. It automatically adapts to different content types and can display various media formats including images, videos, and embedded content.

Overview

The Content block is designed for single content pages where you want to display detailed information about one specific content item. It intelligently handles different content types from your Tourismo admin platform, including Block Editor content, Markdown, Plain Text, URLs, and Media. The block automatically detects the content type and renders it appropriately, supporting both single images and media carousels.

Block Features & Options

Display Modes

  • Content Type Detection: Automatically detects and renders content based on its type
  • Single Content Mode: Optimized for individual content pages
  • Multiple Content Mode: Can display content in collection contexts

Layout Options

  • Show Title: Display the content title
  • Show Description: Display the content description/body
  • Show Image: Display the content hero image
  • Show Media: Display additional media gallery
  • Show Tags: Display content tags

Content Type Support

  • Block Editor: HTML content with embedded media (videos, iframes)
  • Markdown: Rich text content with markdown formatting
  • Plain Text: Simple text content
  • URL: External link display
  • Media: Image or video gallery with carousel support
  • Media And Markdown: Combined media and text content

How it Works

The Content block queries your Tourismo Platform API to retrieve a single content item. It automatically detects the content type and renders it appropriately. For media content, it supports both single images and carousels using Flickity. The block handles different content types intelligently - Block Editor content can include embedded videos and iframes, while Media content can display image galleries or video players.

How to Add & Configure

  1. Add the Content block to your page using the block editor
  2. Select Content Type (if needed) - Choose a specific content type for filtering
  3. Configure Display Options - Toggle title, description, image, media, and tags display
  4. Set Block Alignment - Choose left, center, right, wide, or full alignment
  5. Add Custom Classes - Apply additional CSS classes if needed

The block automatically adapts based on the page context - it will display differently on single content pages versus collection pages.

Shortcode Usage

Basic Shortcode

[tourismo-content]

Complete Options Table

Option Type Default Description
content_type string "" Content type name for filtering (multiple content mode)
content_type_slug string "" Content type slug for filtering (single content mode)
show_title boolean true Display the content title
show_description boolean true Display the content description/body
show_image boolean true Display the content hero image
show_media boolean true Display additional media gallery
show_tags boolean false Display content tags
custom_template_name string "" Custom template override name
class_name string "" Additional CSS classes
align string "" Block alignment: "left", "center", "right", "wide", "full"

Practical Examples

Display content with all elements:

[tourismo-content show_title="true" show_description="true" show_image="true" show_media="true" show_tags="true"]

Minimal display with only title and description:

[tourismo-content show_image="false" show_media="false" show_tags="false"]

Filter by specific content type:

[tourismo-content content_type="blog-post"]

Custom alignment and classes:

[tourismo-content align="center" class_name="my-custom-content"]

Content Displayed

The Content block displays a single content item with the following information:

  • Title: Content title (if enabled)
  • Hero Image: Featured image (if enabled)
  • Content Body: Rendered based on content type:
    • Block Editor: HTML content with embedded media
    • Markdown: Formatted text with markdown support
    • Plain Text: Simple text content
    • URL: Clickable external link
    • Media: Image/video gallery with carousel
    • Media And Markdown: Combined media and text
  • Media Gallery: Additional images/videos (if enabled)
  • Tags: Content tags (if enabled)

Content Type Handling

Block Editor Content: Supports embedded videos, iframes, and rich HTML content Media Content: Automatically creates carousels for multiple images/videos Markdown Content: Renders with full markdown formatting support URL Content: Displays as clickable external links

The block automatically handles responsive design and provides appropriate styling for each content type.

Related Blocks

  • Contents Block - Display multiple content items
  • Title Block - Display content titles
  • Description Block - Display content descriptions
  • Tags Block - Display content tags