Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Targets

Security covered Maintenance fixes only 1 sites

This module allows you to split your website's content for different groups of visitors using unique URL prefixes. You can customize content, navigation, and even pages to be specific to each target audience. It integrates with various Drupal components to ensure content is delivered appropriately based on the selected target.

Overview

This is an easy way to split a content for a specific group of site visitors. This module will split your site by a specific url prefix after installation and configuration. You can create multiple targets e.g. Private accessible on example.com/en/private and Professional accessible on example.com/en/professional.

Here is a couple of simple examples:

  • Contact us page can contain different content per a target
  • About page can be available only for one of the target e.g. Professional target example.com/en/professional/about
  • Home page can have different layout and content per a target
  • Site navigation can contains different links, some of them can be available for all targets

Technical background

A target is a config entity with different configuration + url prefix and target link can be translated.

Here is a list of content that can be separated by target:

  • Node <-- by targets field
  • Menu link content <-- by targets field
  • Block content <-- by custom condition plugin
  • Page variant from page manager <-- by custom condition plugin
  • Views <-- by custom views filter

There is also integration with Simple XML sitemap, so all links in XML use a target prefix.

Installation

After installing the module you will need to set up targets for your site, by default all content is available for all targets. Next step will be to display a Target block to let users easily switch between targets (it looks like a language switcher).

Now you can just set up proper filters and create/update content for your site.
Enjoy it

Documentation

Follow this documentation https://www.drupal.org/docs/contributed-modules/targets

Suitable for editors and developers.

Drupal 9–10 · not 11

Ask your assistant about Targets

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

  • Token
  • field Drupal core
  • language Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
May 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.1.6 Stable 9–10 Jul 3, 2023
1.1.5 Stable 9–10 May 11, 2023
1.1.x-dev Dev 9–10 May 11, 2023