Module Description
Create separate pages for different view modes for a given content type.

Drupal 9/10:
* Requirements

* Token
* CTools


* Configuration
On the configuration page you can add as many path patterns as you desire, path patterns are based on the regular entity url's/aliases.

For instance, if you want to show the teaser at a specific URL.


* Go to your drupal admin -> "Configuration" -> "Search and metadata" -> "Entity view mode path".
* Here you can add a path pattern like /%/summary and select the view_mode teaser.


* If you have a content page which regular entity url/alias is "/my/great/page".
* You can now visit "/my/great/page/summary" which will render the teaser of that page.

The module configuration is exportable like you would expect.



7.x Branch:
* On the manage display page for a given content type, you can assign patterns for view modes so that they will become a page at the given path. For instance, if you want to show the teaser at a specific URL, you could do node/%/teaser. If you also use Display Suite or other modules that allow you to create new view modes, you can use these modes to display one or more fields from a node at a separate URL. This module also includes basic Features module integration. This allows you to selectively export your settings in a feature.

Restrictions: currently, the node path must be contained in the URL. This means view mode pages must follow the form [node path/node alias]/[view mode url]. These pages are added via hook_menu. Multiple wildcard characters can be used.


* How to add a view mode page

* Create a content type
* Configure a view mode. If you are using Display Suite, or another means of adding view modes, you may need to add a new one.
* Go to the "manage display" tab for your content type.
* In the "View mode pages" tab, enter your URL pattern for the view mode page.
* Save the content type. You may also need to clear the Drupal cache, but the page should be available!


* Some tricks
Initially, this module was going to display a single field from a node on a page. The view mode example is much more flexible as it allows for multi-field pages.

Additionally, if you are using something like Display Suite, you can add blocks from Views or other sources to your display allowing you to customize the view mode pages even more.


* Entity Support (v2.0)
The original VMP module was written to support nodes. There is now a release that has added entity support. Please check the entity support issue for more information about changes to the API and functions provided by this module.


* API/Hooks (v1.2)
Recently added some API/hooks for this module that may allow for more control of the output of the view mode page. Also included some that tie into times when patterns are deleted/added. See the development version (may have to checkout from git).



Project Usage
2157
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to create separate pages for different view modes for a given content type by assigning patterns for view modes to become pages at specific paths.
Data Name
view_mode_page

OPENAI CHATBOT

OPENAI CHATBOT

11:52:10
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.