Closed (works as designed)
Project:
Robotic Theme
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2018 at 09:27 UTC
Updated:
4 May 2021 at 11:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Orjan commentedComment #3
kunal_kapoor commentedThe patch provided is not working Please provide the correct patch
Comment #4
gauravvvv commentedThe standard read more link, as the comments in NodeViewBuilder say, is always displayed on a teaser by default because there is no (easy) way to know how the teaser content differs from the full view. Your content type might have several other text fields apart from the body which are only shown on the full page view.
However, it should be possible to implement a custom "read more" link that has the behaviour you seem to be asking for. I don't think anyone has implemented one yet, but the most fruitful approach would be a modest extension of the "summary or trimmed" field formatter, although you could probably also do something in a preprocess hook in your theme.
Edit: A demonstration module is up on github now. It's not perfect and I would like to refactor it and possibly make it more general-purpose but it works for the simplest case.
Comment #5
gauravvvv commentedComment #6
kunal_kapoor commented