Issue accessing copied field in DS Twig template

Created on 15 July 2020, about 5 years ago
Updated 30 July 2025, 3 days ago

Hi there! I am trying to access a copied field inside of a Display Suite Twig template. So far no luck.

The name of my template which is functioning otherwise is: ds-1col--paragraph-culture-component.html.twig

The machine name of the copied field is: large_culture_features_test

I am attempting to output the field using: {{ ds_content.large_culture_features_test }}

Stupid stuff like names have been looked into a few times.

But so far no luck. Anything easy I am missing? :) tia

💬 Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇺🇸United States bayousoft

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.

  • 🇦🇺Australia jannakha Brisbane!

    in twig template try:
    {{ dump(ds_content) }}
    you'll see structure of your DS render array, your copy field should be there:

    0 array:7 [▼
      "field_rcks_header_logo_with_text" => array:18 [▶]
      "group_rcks_details" => array:21 [▶]
      "field_rcks_disclaimer_text" => array:18 [▶]
      "group_rcks_table_of_content" => array:19 [▼
        "field_rcks_special_comments" => array:2 [▶]
        "display_field_copy:node-rcks_spec_systems_toc" => array:16 [▶]
        "display_field_copy:node-rcks_data_sheets_toc" => array:16 [▶]
        "field_rcks_add_maintenance_guide" => array:18 [▶]
        "#attached" => array:1 [▶]

    In my case copy fields are under a field group:
    {{ ds_content['group_rcks_table_of_content']['display_field_copy:node-rcks_spec_systems_toc'] }}

Production build 0.71.5 2024