how would I best wrap my entire node in an tag linking to the full node? My nodes are display using Display Suite and a custom view mode.
I'm guessing creating a php template and manually writing the link somehow would work?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityhow would I best wrap my entire node in an tag linking to the full node? My nodes are display using Display Suite and a custom view mode.
I'm guessing creating a php template and manually writing the link somehow would work?
A good option for this is Field Group Link.
For your case, basically you need to create a field group wrapping the whole node, and set the group type to 'Link'.
When you go /admin/structure/types/manage/blog/display/teaser
(or whatever content type you're going for) at the bottom is a list of possible template names. In my example ds-2col-stacked-fluid--node.tpl.php
was what I needed.
In the template file I ended up wrapping my content variables with the following:
<a href="<?php echo url('node/' . $nid); ?>"> normal node here </a>
One thing to note is that you need to make sure there are no nested links around fields like image, author or title.
You can do this with a display suite custom wrapper.
Make sure you are using a display suite layout for the teaser view mode, and then select custom wrappers from the bottom left hand menu. Choose "link to content" from the "add link" drop down.