Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Content callback

Security covered Obsolete 19 sites

This module allows you to embed custom rendered content created in code directly into your Drupal entities, leveraging entity features like aliases and searchability. It also provides a custom Views display for your rendered content and integrates with block plugins.

What does Content callback do?

This module allows you to return any renderable array, created in code, via a field.

For drupal 7 you need to register a content callback via hook_content_callback_info() it will be available in the Content callback field options.

The drupal 8 version is rewritten based on the plugin api. Examples can be found in the example module packed with the drupal 8 version. The drupal 8 version also contain some new stuff such as configuration options for the content callback and an integration with block plugins.

Why would you use Content callback?

We started using this in every project. You have the freedom to create anything you want in code. Via this module, this content can be displayed in the context of an entity. So? This way you have all the extra's an entity provides. For example an alias, menu item, meta tags, searchable!!,..

Views display

This module contains an extra module with a custom views display. Just create a Content callback display and it will be available via the Content callback field. Guess what, the view will become searchable. Big awesomeness!!

Context plugin

This module provides a context condition. If a certain callback is executed the condition will be fulfilled. This is not yet implemented in the drupal 8 version as context isn't ported yet.

Sponsors

Module sponsored by Nascom.

Drupal 9–10 · not 11

Ask your assistant about Content callback

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Feb 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
2.0.1 Stable 9–10 Feb 10, 2024