How do I include this field in a node template?

Created on 24 August 2020, almost 4 years ago
Updated 14 October 2020, over 3 years ago

I would like to make this part of the "meta" content that is displayed before a typical drupal node, like 'Category | Date of Publishing | No. of Comments | xx mins read'. Currently, if I copy-paste the field code from the reading-time.html.twig file into a node template file (a node type for which the reading time is activated), I do not get any time displayed. Only my prefix, such as "read" is displayed in the front-end. The code I am using is

        <span class="post-comment"> 
          {{ reading_time }} read
        </span>

Please let me know if this is the correct way to display this field, or if there is anything I am doing wrong.

Thanks in advance.

💬 Support request
Status

Fixed

Version

1.2

Component

Code

Created by

🇮🇳India jasperlevi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024