1

I am making a website in Drupal 8. I made a new content type 'Slide' and a view called 'Presentation' that shows all slides as a blog page. I enabled the pager and set it to 1 item per page. This results in a nice slide show. See screenshot ('presentatie' is Dutch for 'presentation'):

Screenshot view 'Presentatie'

The slides are small articles, containing text content and an image. They are shown by the Presentation view as full content, but their titles are still shown as links to the full article (slide) content. I don't want this linking, because by going to the full article, you leave the presentation page with pager for navigating through the slides. See screenshot of result on site below:

enter image description here

I am pretty new to Drupal and I can not find where or how to switch this off. Could anyone tell me?

1

To remove link from Title, what you have to do is click on the title field in views, and there is a checkbox Link to the Content. To unlink this, you have to uncheck this field. I am attaching a screenshot to it :

enter image description here

| improve this answer | |
  • Hi, thanks for the try. What you are showing, is how to remove the links from the article/page titles in the admin view 'Content'. That's not what I meant. I edited my question, adding a screenshot and making it more specific. – Herman Feb 25 '16 at 18:08
  • @Herman you could change the Show: Content to Show: Fields then add the body field and any other field you need. – No Sssweat Feb 25 '16 at 19:28
  • @NoSssweat Yesss... thank you so much, that does the job quite well! I actually tried Show: Fields, but couldn't find the body field to add it (was looking for content). I will create an answer to my question from this, as soon as I have figured out how to get the correct html code around the fields (title in <h2>). – Herman Feb 25 '16 at 20:19
  • @Herman click on title field and then under style settings select h2 – No Sssweat Feb 25 '16 at 20:29
  • 1
    @NoSssweat O, perfect! Lot of options I see. Thanks again! I am exploring Drupal since three days now (I have been using Joomla for some years) and Drupal is slowly gaining more and more appreciation... – Herman Feb 25 '16 at 20:59
1

You can't do this in views when using rendered nodes. In fact, you can't do it in the UI with just core. This is hardcoded in the node template, unfortunately.

You have to either provide a node template for that node type and view mode (see https://www.drupal.org/node/2354645) and then remove the link tag around the title, or use a module like Display Suite

| improve this answer | |
  • Display suite explanation is here: drupal.stackexchange.com/questions/76013/… – Neograph734 Feb 25 '16 at 23:04
  • @Neograph734 Thanks for effort, but it turned out to be possible very well. See answer, based on NoSssweat's comments. – Herman Feb 26 '16 at 14:43
  • @Herman Yes, note how I said "when using rendered nodes". You can do it with fields, and if that works for you great. That has other limitations (like, when you actually want to customize a template, I find it much harder to do with views fields) and it's not as performant as each field is rendered on its own. shouldn't make a huge difference now that views output is also cached. – Berdir Feb 26 '16 at 20:38
0

In the view Presentation, under FORMAT change Show: Content into Show: Fields.

Then under FIELDS add the desired fields, in my case:

  • Content: Title
  • Content: Body
  • Content: Image

To get the correct formatting and css styling by my theme:

  • Under FORMAT open Format: Settings, set Row class to "node".
  • Under FIELDS open Content: Title, under STYLE SETTINGS check Customize field HTML and set HTML element to "H2".
  • Under FIELDS open Content: Body, under STYLE SETTINGS check Customize field HTML and set HTML element to "DIV".
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.