Title pretty much sums it up.

Drupal 8.

I have a view that compiles the full content of a content type. Some titles are longer than others which offsets the grid.

However - the titles are redundant as they are stated in each node description. But are needed in the colorbox pop-up.

Can this even be done? Or do I need to approach it another way?

Thanks!

Comments

pixelsweatshop’s picture

You can do this a few ways:

1. https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

2. use css display:none; to hide it.

3. Use the fields settings, instead of view mode to specify which fields you want.

John_B’s picture

Hiding in CSS is tempting but slightly lazy. If you don't want to use a view composed of fields, the cleaner alternative is to change the theme template for the content type. One method would be to create a custom View mode to use in the view instead of 'Full' and make a template for that which does not print the titles. The question of how to make a template is rather large though for this task it will not be difficult: you can just take the node template, put a copy in your theme, and tweak it. The theming documentation shows how, though it does seem to assume familiarity with Drupal 7 templating.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

sprite’s picture

use a fields view instead

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

adminMN2023’s picture

I did switch to field view which did the trick quickly.

Thanks for the suggestions!