Tagged Questions

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

0
votes
1answer
27 views

Theme based altering of default image-style for the same node-type and view-mode

OK, After some research and since Domain_views module seems to be a little bit buggy (printing always default Domain ID no matter what), I think this is the base question solving my problem the other ...
0
votes
4answers
78 views

How do I get a view to display as themed within a simplenews html email?

I am trying to create a simplenews newsletter, also using Simplenews Scheduler, to weekly send out a newsletter with the content defined by views. I have a content type set up, and the views defined. ...
0
votes
1answer
46 views

Display node in multiple context

I'm using Drupal 7, and this problem have been tormenting me these past few days : let's say I'm using the basic content type Article, with basic view mode : full and teaser. Now I'm creating a ...
0
votes
1answer
22 views

View mode theme name priority

I am on Drupal 7. I have a theme set for view mode 'Teaser'. The theme name for this is named like this: node--teaser.tpl.php. So far so good. Then I created content type 'something' and I would ...
0
votes
1answer
19 views

Getting error rendering same node in different view mode

Unsupported operand types in /node/node.module on line 1419 On my site users have the ability to flag a content type (node) as being featured on the right rail. I then have a view that renders a ...
0
votes
1answer
42 views

How to remove submitted & author information on Entityform submission view?

I'm trying to remove the author/submitted information from an entityform submission view and I don't seem to find the right way to do so. I'm using Display Suite to manage the view of the email that ...
1
vote
0answers
37 views

Programmatically select image style for use with custom file entity view mode

I have created an empty custom view mode for file entities with hook_entity_info_alter(). I would like to programmatically select settings for it, so that they can be deployed without a user having ...
0
votes
0answers
18 views

Trouble enabling view modes for content types

I have a custom view mode and need to enable it for a node type. I need to enable it through my module, and it seemed like hook_entity_info_alter() is the way to go, but it's not working. Am I ...
0
votes
0answers
13 views

How to add tags on node view mode?

By default, users can only see terms on the node view mode page(or block). But I need some roles to add tags when they view nodes. How to get that done? I've searched but no useful answers returned.
1
vote
1answer
62 views

Make a custom view mode default

I made a custom view mode in Display Suite and I would like to use it as the default view mode for a given content type. Can anybody enlighten me as to how to do it?
0
votes
0answers
25 views

How can I get unique values using View Attachments?

I have a View with a View Mode parent, and multiple child View Modes that are Attachments to the parent . Each child mode pulls node ids based on a different field of a content type. If more than one ...
0
votes
1answer
31 views

How to avoid caching of fields in Entity View?

I have a few computed fields on my entity and they have dynamic values. These values cannot be cached because they change often. I've created the necessary field formatter that uses the same approach ...
0
votes
1answer
206 views

Render field collection multiple times on node.tpl.php

I have created a custom view mode for field collections with this code: /** * Implements hook_entity_info_alter(). */ function view_modes_entity_info_alter(&$entity_info) { ...
0
votes
1answer
28 views

How can I use View modes for entity without bundles?

I have an entity that has no bundles(ie. it has itself as a - 1 - bundle) and I need to be able to use View modes for it. My understnading is that the Field UI needs the 'bundle of' entity to exist ...
0
votes
1answer
55 views

Node access based on view mode

I have a content type with multiple fields. Some of the fields are accessible to everyone and there are other fields for which the access is controlled. Example: There is a content type called ...
1
vote
3answers
35 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
102 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
18 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
281 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
102 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
59 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
95 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
240 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
112 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
583 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 ...
2
votes
4answers
399 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
211 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
358 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
441 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
109 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
152 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 ...
1
vote
1answer
372 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
103 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
383 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
183 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
97 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
223 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
429 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 ...
6
votes
2answers
2k 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 ...
7
votes
3answers
354 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
2answers
1k 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
78 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 ...
3
votes
2answers
312 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
183 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
1answer
451 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
277 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
3k 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
929 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 ...