By jasonmacer on
I have added some custom fields to a content type, and when I put the site into twig development mode I get this from a dump:
"row" => Drupal\views\ResultRow {#5317 ▼
+_entity: Drupal\node\Entity\Node {#4585 ▼
#entityTypeId: "node"
#enforceIsNew: null
#typedData: Drupal\Core\Entity\Plugin\DataType\EntityAdapter {#4900 ▶}
#cacheContexts: []
#cacheTags: []
#cacheMaxAge: -1
#_serviceIds: []
#_entityStorages: []
#values: array:22 [▶]
#fields: array:6 [▼
"field_image" => array:1 [ …1]
"title" => array:1 [ …1]
"field_news_title_block_adjustmen" => array:1 [ …1]
"field_news_title_sidebar_adjustm" => array:1 [ …1]
"body" => array:1 [ …1]
"field_date" => array:1 [ …1]
]
#fieldDefinitions: array:25 [▶]
#languages: array:3 [▶]
#langcodeKey: "langcode"
#defaultLangcodeKey: "default_langcode"
#activeLangcode: "x-default"
#enforceDefaultTranslation: null
#defaultLangcode: "en"
#translations: array:1 [▶]
#translationInitialize: false
#newRevision: false
#isDefaultRevision: "1"
#entityKeys: array:4 [▶]
#translatableEntityKeys: array:8 [▶]
#validated: false
#validationRequired: false
#loadedRevisionId: "449"
#revisionTranslationAffectedKey: "revision_translation_affected"
#enforceRevisionTranslationAffected: []
#isSyncing: false
+in_preview: null
}As you can see in #fields there are: field_image, title, field_news_title_block_adjustmen, field_news_title_sidebar_adjustm, body, and field_date.
For the life of me I cannot get twig to render either field_news_title_block_adjustmen or field_news_title_sidebar_adjustm.
{{fields.field_date.content}} renders just fine
{{fields.title.content}} redners just fine
but neither {{fields.field_news_title_block_adjustmen.content}} or {{fields.field_news_title_sidebar_adjustm.content}} will display any content.
I am trying to figure out what I am doing wrong, so any help is greatly appreciated!
Thank you!
Comments
[SOLVED]
So, it turns out I was missing an entire content view that handled the side bar. Complete bone headed, idioticly stupidly simple mistake.
It does work, and now I'm going to go pound my head against the desk.