I am using the option to create blocks from fields, so I can't use the default view mode, but I want to view this custom display at the standard node URL. How do I get a different view mode to print on the node.tpl.php? Is it possible (yet)? I have seen the core issue related to this, but is there any way?

Background: I wanted to experiment with the idea of putting fields into boxes so that I can make my layouts responsive. Because currently I don't see that the layouts for display suite or panels are responsive (i.e. respond to media queries). But if I can put the content into boxes then they would follow the responsive regions on the theme (using Adaptive theme, but for any adaptive theme the issue would be the same, I think).

Any ideas or solutions?

Comments

granticusiv’s picture

I'm looking for an answer to this too. I setup my node.tpl.php to display a template for each content type in default/full content mode. I then found DS and used it to create blocks from regions, but noticed as soon as I used 'Select a layout' under 'Manage Display', my nodes ceased using the node.tpl.php templates I'd setup. Is there any way to use node.tpl.php or an equivalent?

Display Suite 7.x-1.4

nevets’s picture

I wonder if you are looking for Adding Custom Layouts to Your Theme

granticusiv’s picture

Yay! I didn't see this earlier. Once I'd selected a layout, this was written underneath:

You have selected the One column layout. The default template can be found in sites/all/modules/ds/layouts/ds_1col

Possible template suggestions are:
ds-1col--node.tpl.php
ds-1col--node-portfolio-piece.tpl.php
ds-1col--node-portfolio-piece-full.tpl.php

I copied ds-1col.tpl.php from the module's layouts and treated it like a normal node.tpl.php. It recognises code like

<?php if ($node->type == 'article') : ?>

Jeff Burnz’s picture

Anybody doing this with Panels layout plugins, I cant get the suggestions to kick in, using DS layouts is not a problem, suggestions kick in every time a coconut, but with Panels not a happening thing.

Jeff Burnz’s picture

swentel’s picture

Status: Active » Closed (fixed)

@Jeff, I'll fix that this weekend.

@tchopshop If you want a different view mode at node level, you can use the 'Switch view mode' option that comes in ds extras. It allows you to set a different view per node.