Closed (fixed)
Project:
Twig Field
Version:
8.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2018 at 12:46 UTC
Updated:
29 Jul 2018 at 09:19 UTC
Jump to comment: Most recent
Comments
Comment #2
chi commentedDo you mean it does not even render a static text? Can you check the field is enabled on "Manage display" tab?
Comment #3
bkraegelin commentedI just did a reinstall of twig_field and codemirror_editor.
Is there anthing missing? Perhaps activating StringLoader?
Comment #4
chi commentedI've just followed your steps and it worked for me as expected. This needs more details to reproduce.
Comment #5
bkraegelin commentedHow can I dig deeper in testing?
I installed devel module, but I'm not familiar with it. My Drupal experience is back to 5.x and 6.x :(
Comment #6
chi commentedCan you try this on fresh Drupal installation with default theme?
Comment #7
bkraegelin commentedYes, it works. Thanks. Maybe a damaged Drupal instance.
How can I access other fields of my taxonomy term from within this Twig field?
Comment #8
chi commentedIn field settings you should specify display mode to fetch context from.
Comment #9
bkraegelin commentedThanks, it works.
Last question:
I want to create a taxonomy to define "text blocks" for GPDR. These text blocks should have placeholders (Twig variables and conditionals). For a particular server I want to assign the different text blocks using my custom taxonomy.
From within the text blocks (taxonomy term field) I want to access fields of the server node to fill in placeholders based on conditionals "{% if field %}". Do you have an idea for such an application?
Comment #10
chi commentedI don't quite understand your task. Note that checking field values can be tricky because fields in Twig template are actually render arrays.
See #2547559: Checking for empty fields in Twig templates is complicated for details. Instead of fields use properties of entity object (node or taxonomy_term) in condtions.
Comment #11
chi commentedSeems resolved.