Project Links

Project Description

This module allows site builders to assign a URL for different view modes related to a specific content type. In conjunction with modules like Display Suite, which allow you to add custom view modes, you can display the same node in different ways.

How to add a view mode page

  1. Create a content type
  2. 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.
  3. Go to the "manage display" tab for your content type and select the view mode you want.
  4. In the "View mode pages" tab, enter your URL pattern for the view mode page. You may use wildcards (%) in this pattern.
  5. Save the display mode. You may also need to clear the Drupal cache, but the page should be available!

For Drupal 7

Comments

c4rl’s picture

This is just my opinion, but I feel strongly that the word "page" is used too often in Drupal to mean many, many different things. Instead of the name "view mode page," would you consider naming this project "view mode path" or "view mode url?"

cedewey’s picture

I have used this module and it is very useful. It will definitely be a good addition to the Drupal module ecosystem.

Jeffrey C.’s picture

Automated Review:
An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.

You can find the results of the automated report at http://ventral.org/pareview/httpgitdrupalorgsandboxrballou1630324git.

prathK’s picture

Status: Needs review » Needs work

Hi,

I have reviewed your module manually. code looks neat and useful functionality of module.

There is one minor suggestion from me for better understanding for developers.
on line : 29 view_mode_page.module
if (!$is_node_page || $is_node_page && !$is_display_overview) {
it becomes developer friendly when we specify braces in the code and machine friendly too as braces
specify precedence as well.
Above code line can be re-written as
if (!$is_node_page || ($is_node_page && !$is_display_overview)) {
Or
if ((!$is_node_page || $is_node_page) && !$is_display_overview) {
whichever is applicable in your case.

Other stuff seems fine to me. Nice use of features api and hooks.. :)

Cheers,
prathK
extrimity.in

rballou’s picture

Status: Needs work » Needs review

Thank you all for the reviews! I have made the changes for number 3 & 4.

cedewey’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed, nice work.

sreynen’s picture

Status: Reviewed & tested by the community » Fixed

Hi rballou,

Thanks for your contribution and welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects, at your discretion.

Now that you've experienced the full review process, please consider reviewing other projects that are still awaiting review. Anyone can help with reviews, following the guidelines.

c4rl’s picture

Any response to comment #1? :)

sreynen’s picture

c4rl, I don't think this is a good place to discuss something as broad as the meaning of "page" in Drupal. As you said, "page" is used in Drupal to mean many different things, so that should be a wider discussion, maybe on http://groups.drupal.org/coding-standards or http://groups.drupal.org/code-review

FYI, this review process has a history of turning new contributors off of Drupal entirely by refusing them Git access until they deal with issues veteran contributors regularly ignore. There's not much risk of that in this case, but I'm still pretty wary of anything that seems like an unnecessary hurdle.

c4rl’s picture

Sure, I understand and agree that "page" has implications beyond this project.

This isn't a blocker, just a suggestion that "view mode path" might be a more descriptive name if the contributor agrees. If not, no problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.