Drupal Radix Theme
  • Introduction
    • Overview & Support
  • Installation
    • Requirements
    • Getting Started
    • Setup with ddev
  • Understanding Radix
    • Individual files and directories
    • Bootstrap Build
    • Bootswatch
  • Working with the components
    • Components: Intro
    • Components: A deep dive
    • An example component
    • The drupal-radix-cli
    • Copy and modify a component
  • Components
    • Accordion
    • Alerts
    • Badge
    • Block
    • Buttons
    • Button Group
    • Breadcrumb
    • Card
    • Carousel
    • Close button
    • Comment
    • Collapse
    • Details
    • Dropdown menu
    • Field
    • Field Comment
    • Fieldset
    • Figure
    • Form
    • Form: Element
    • Form Element Label
    • Form Element: Radio Checkbox
    • Heading
    • HTML
    • Image
    • Input
    • List group
    • Local Tasks
    • Media
    • Modal
    • Nav
    • Nav Item
    • Navbar
    • Navbar Brand
    • Node
    • Offcanvas
    • Page
    • Page: Content
    • Page: Footer
    • Page: Navigation
    • Page: Title
    • Pagination
    • Progress
    • Radios
    • Region
    • Select
    • Spinners
    • Table
    • Taxonomy
    • Textarea
    • Toasts
    • Tooltips
    • User
    • Views: view
    • Views: view--grid
    • Views: view--table
    • Views: view--unformatted
  • Misc
    • Migration and upgrading
    • Roadmap
    • Credits & Contributions
Powered by GitBook
On this page
  • Key Features
  • Customization
  • Usage

Was this helpful?

  1. Components

HTML

Theme implementation is designed for the primary structure of a Drupal page.

Key Features

  • User Status: The template adapts based on the user's logged-in status.

  • Dynamic Root Path: It identifies and classifies pages based on their root path (e.g., 'node', 'admin', 'user').

  • Content Type Recognition: For pages representing a node, the template can identify the content type.

  • Flexible Head Title: Comprises elements like page title, site name, and slogan, assembled dynamically.

  • Page Segmentation: Divides the page into page_top, page, and page_bottom segments for structured content rendering.

  • Offline Database Flag: Indicates if the database is offline.

  • Head, CSS, and JS Management: Integrates placeholders for head elements, CSS, and JavaScript.

  • Accessibility Features: Includes a 'Skip to main content' link for enhanced keyboard navigation.

Customization

  • CSS and JS Integration: Easily integrate custom stylesheets and JavaScript files using placeholders.

  • Language and Path-based Styling: Customize the appearance based on language settings and the root path.

Usage

{% embed "radix:html" with {
  attributes: { class: ['custom-class'], id: 'custom-page-id' },
  logged_in: true,
  root_path: 'node',
  node_type: 'article',
  head_title: { title: 'Example Radix Page', name: 'Yolo!', slogan: 'Yolo today!' },
} %}
  {% block body_end %}
    'Some JS code that needs to run at the end of the body tag'
  {% endblock %}
{% endembed %}
PreviousHeadingNextImage

Last updated 1 year ago

Was this helpful?