A view mode is a combination of settings that define how an entity (or node prior to Drupal 7) is shown.

learn more… | top users | synonyms

1
vote
3answers
28 views

Is there a standard way to control which node or entity links appear in which view modes?

My module adds a link to the node view, from within hook_node_view. Is there a "Drupal" way to let the site builder control which view modes should show that link? Right now, I'm using a multiselect ...
0
votes
1answer
42 views

How to get available view modes per content type? [duplicate]

I am looking for an function that returns all view modes per content type. I already tried to use mobile_theme_entity_view_mode_alter but this function will return all available view modes for a node ...
0
votes
0answers
8 views

Field collection field linking to node it appears on in a view mode of that node

I have a nodetype with a view mode, "higlight". This is used when it appears on a particular page. The highlight view mode outputs a rendered entity: a field collection called "meta". "Meta" has a ...
1
vote
3answers
56 views

Custom view mode for entity references - getting rid of title

I have an entityreference field that displays content in a custom view mode. It works great. The only problem is that in addition to the fields that I placed in my custom view mode, it also displays ...
0
votes
0answers
31 views

Theme view modes using panelizer-view-mode.tpl.php?

I came across the page panelizer-view-mode.tpl.php, while I was searching how to theme diffent view modes. I want to use simple CSS styling on content types per view mode. Is it possible to theme ...
0
votes
1answer
26 views

Panelizer settings page not found for OG group node

I have a site with several content types, all of which are OG content except one type, Group, which is a group. I also have Panelizer and Panels Everywhere enabled. When I go to edit the default ...
0
votes
1answer
34 views

How to render a node with different DS View modes depending on taxonomy term?

I have a Content type containing a term reference field and some other fields. I have created 3 Display suite view modes for this content type. I want each node of this content type to be displayed in ...
0
votes
1answer
69 views

How can I set the view mode of a node through rules

I'd like to change the view mode of a node based on the role of a user and another flag in the node. Since a call to display the node by default is full content, I wrote a rule that on Content is ...
0
votes
0answers
52 views

Drupal 7: Multiple View Mode in Views Search Filter

I would like to know if this is possible in Views. I have a Content Type with 2 Custom View Modes. Is there a way to combine View Modes into one search filter in Views? If that make sense. What I'm ...
2
votes
1answer
161 views

Template suggestions for file_entity.tpl.php

Short version My aim is to theme a file field in a view of node fields. In the view configuration, the field formatter is set to Rendered file and a view mode is selected. How do I suggest a template ...
1
vote
3answers
147 views

CKEditor: *During* WYSIWYG edit, how to show caption beneath image?

When editing a body field with image and caption, the caption does not display during editing. Once saved it is visible - when the content is viewed. Implementation-wise, I've added a caption field ...
0
votes
2answers
85 views

How to apply or assign custom view mode to user display?

I am using Display Suites. I have created a custom view mode and have made it available to the user display per Display Suite documentation, but I cannot figure out how to apply the custom view mode ...
0
votes
1answer
141 views

Managing different view modes for a single content type

I have three different view modes for a single content type on my site. Besides the default and teaser view modes, using Display Suite, I made a custom one called "simplified" . What I need is to make ...
2
votes
5answers
202 views

Is there an equivalent of view modes for form editing?

I have a content type with a lot of fields. End users need to create content of this type, so I want to provide them with a simplified form so that they can create a content item and edit it without ...
0
votes
1answer
82 views

Getting pages defined by taxonomy to display in a view

I have a page view that displays video thumbnails in a grid layout (three columns.) Above each thumbnail is the title of the video and below it is the category. The category is defined by taxonomy and ...
5
votes
2answers
105 views

What is the difference between a view mode and a style plugin?

It is possible that you can define the difference between a view mode and a style plugin. As far as I understand a view mode defines what fields are outputted and a style plugin decides how to render ...
0
votes
0answers
105 views

Simplenews ignores referenced entity view mode

I am using simplenews to send newsletters. My newsletter node contains an entity reference field with which I am able to attach other nodes to the newsletter. When I wanted to customize my newsletter ...
1
vote
1answer
237 views

How to render custom view mode in d7

I'm trying to render nodes with a custom view mode, having another tab for each node in the same place than "Edit", "View", etc. So I have declared my custom view mode with hook_entity_info_alter, my ...
2
votes
1answer
85 views

Node editing in full mode

Is there a way to expose selected node fields so that they are directly editable when the node is being viewed? The use case is I want visitors to my site to be able to type some context into a ...
0
votes
1answer
188 views

How do I apply a defined Image Style as a View Mode for a File field?

I'm currently working my way through O'Reilly's "Using Drupal", but I appear to have reached an impasse. I'm trying to specify a view mode for a File field-type which utilises the Media File Selector ...
1
vote
0answers
136 views

Is it fine to use hook_entity_view_mode_alter() to intercept an entity view to change the view mode based on an attached field value?

Basically I want to let the content creator choose an arbitrary view mode. For example, be able to choose a gallery that is a FlexSlider slideshow, a Masonry jQuery plugin type image gallery, or an ...
2
votes
1answer
83 views

I am unable to show the access denied message of the premium content module. How can I do this?

I have 3 view modes (teaser, presentation and full view mode). I have created a node--content-type.tpl.php and created the code for each view mode using a conditional statement if($teaser) {} ...
0
votes
1answer
179 views

How to associate an entity view mode with a path? (Commerce product entity)

I created a view mode for a Commerce product entity with http://drupal.org/project/entity_view_mode , now I would like to associate this with a path like myproduct/[entity_id] , so I can attach meta ...
3
votes
1answer
376 views

Entity Reference- How do I display more than one view mode?

I am using entity reference to display some nodes. In manage display, I am rendering my entity reference content with teaser view mode. However, I need to display the first node different. I need the ...
5
votes
2answers
1k views

Change the view mode programatically

I want to change the view mode of node programmatically. I used hook_preprocess_node(&$vars) and set the view mode function moduleName_preprocess_node(&$vars) { // if conditions to ...
6
votes
2answers
253 views

How can I take control of the rendering of a file entity when inlined in text?

There are excellent instructions for how to allow embedding Media into text fields here Setting up WYSIWYG and CKEditor to include Media Browser / Embed Media button. Now I'm trying to control the ...
4
votes
1answer
544 views

Hook into other module's field formatter?

Am currently trying to implement a node referenced image field on my Drupal 7 site that will change it's 'view mode' depending on programmatical logic just before render. The field is currently being ...
3
votes
1answer
62 views

Custom tpl for view mode for all contenty type

I've saw How to provide template for particular view mode?, but I don't to create a single tpl for every content type for a particular view mode, but a tpl used for every content type for a particular ...
2
votes
2answers
254 views

use a custom view mode in node.tpl

With Display Suite we can make custom view modes other then Teaser to use through out the site (in views for example). This is working fine and very nice! However, using the custom view in a .tpl ...
0
votes
2answers
123 views

Link to a different view mode from entity reference

Created a entity reference field i CONTENT A and linking it to CONTENT TYPE B. It works fine and takes me to the linked FULL CONTENT. Is it possible to link it to a different view mode like a TEASER ...
3
votes
2answers
1k views

How to create user profile theme hook suggestion for custom template?

I'm using the Chaos tools display suite module to create a 'mini_teaser' view mode for my user profiles, but I can't seem to get drupal to read a custom template 'user-profile__mini_teaser.tpl.php' in ...
4
votes
2answers
1k views

How does Drupal know which Entity View Mode to use?

When Entity View Modes are defined, how does Drupal know which to use? Are they only useful with Views, or can they be used in the node display as well? If so, is that specified in the template, or ...
1
vote
0answers
350 views

How to change the View Mode based on theme?

I am using the ThemeKey module to change the theme for mobile users. I have a custom View Mode called Mobile to display different content. I would like to have when my mobile theme is loaded for the ...
0
votes
1answer
219 views

how to get view_mode from within hook_field_formatter_view

I've created a custom field formatter which works correctly. My problem is that I want to differentiate its output depending on whether it's being used in a default or teaser view mode. The ...
1
vote
4answers
2k views

How to add a 'read more' theme link to a custom view mode?

In Drupal 7 the Teaser view mode automatically comes with a 'read more' theme link. I need to retain the Teaser view mode and then create another called 'Snippet', which is basically the same as ...
2
votes
1answer
605 views

View mode template for user-profile.tpl.php?

I can set up a view mode for the user profile, but I don't know how to create a template targeting it. user-profile.tpl.php is the template used, but I can't figure out how to make a view-mode ...
2
votes
1answer
677 views

Effective use of tokens view mode?

Most probably because of the naming coincidence with the Token module, I cannot find any tutorial or reference as per how to effectively use the Tokens view mode that I can see in perhaps all entities ...
1
vote
1answer
267 views

How to change the path of views content?

have developed a website for my team and used VIEWS for all the link in the website. While trying to click the links from client system it shows some error that says remote connection doesn't accept ...
16
votes
1answer
6k views

How to provide template for particular view mode?

I want to theme the search result view mode with a template. I had it in my head that naming a template file node--article--search-result.tpl.php would do the trick, but I'm obviously wrong about ...
0
votes
1answer
72 views

Node Field formatter to reverse trim

is it possible to reverse trim a field formatter? More specifically, usually theres an ability in the display view mode to trim text. Could i provide it a negative value for it to trim backwards? ...
0
votes
0answers
222 views

node_view() doesn't populate the “content” variable when using a custom view mode

The $content variable is really useful when writing templates, but I've found that it's not fully populated when using a custom view mode. I'm using node_view to create a render array of a node. When ...
3
votes
2answers
167 views

Sort view before print

I have some node IDs I'm passing to a view; however the sort order is wrong. Here's my pseudo code: //query to grab the nids if (!empty($nodeids)) { $view = 'taxo_listing'; foreach ($nodeids as ...
1
vote
1answer
778 views

How to programmatically set custom display settings for an RSS feed?

I am using Drupal 7 and Views 3.0-RC1. I have defined an RSS feed for a view, but the full node content keeps showing up instead of the teaser. I believe it is because of these two issues: ...
3
votes
2answers
2k views

How do I get rid of the node title on a specific view mode?

I'm using D7/Omega subtheme/Display Suite. I have a content type and the nodes are displayed as Default, which is Full Content. But I also have two or three nodes of this content type which must be ...
1
vote
0answers
96 views

How to display nodes in a view, each row using a preselected view mode ?

I would like to create a view that displays a number of nodes, each using its own chosen view mode. I've installed the Display Suite module and created a number of view modes. Using the Views module, ...
2
votes
6answers
4k views

Using a different view mode with a node

I understand using Views you can use a different view mode, e.g. teaser or full content. Is it possible to view a node using a view mode other than the full content view mode? What I want to achieve ...
2
votes
2answers
423 views

Copy view mode custom settings

On /admin/structure/types/manage/article/display I can enable custom display settings for various view modes. But what if I want one custom view mode to be almost identical to another? Is there a way ...
4
votes
2answers
1k views

View mode for specific bundle

Drupal 7 makes it quite easy to create a new view mode (see this tutorial for instance), but is there a way to define a view mode that is only available for a specific bundle (content type)?