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

2
votes
1answer
42 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
60 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 ...
4
votes
1answer
141 views

Entity Reference- How do I display different 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 ...
3
votes
2answers
176 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
80 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 ...
2
votes
1answer
60 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
30 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
129 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
45 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 ...
0
votes
0answers
108 views

how to customize file view mode in Drupal 7?

I want to customize my video file size in my view ,currently i do have file view called default,small,medium,preview,large,original and tokens. and when i select small mode its not showing any video ...
2
votes
2answers
453 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 ...
3
votes
2answers
588 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
183 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
123 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
3answers
751 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 ...
1
vote
0answers
350 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 ...
1
vote
1answer
160 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
117 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 ...
8
votes
1answer
3k 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
64 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
167 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
135 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
577 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
1k 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
80 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
5answers
3k 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
262 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
1answer
590 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)?