0

I have a view for a content type with a number of fields. For one of the fields (List, text) (node_field_type) I would like to override the output result. It can be either type_1 or type_2 . In the database the type is stored in node_field_type table in field_type_value column.

So in the settings of the field under "Rewrite results" tab I picked "Override the output of this field with custom text"

<span class="tag-{{ field_node_type|lower }}"></span>  

But it doesnt assign any class to html tag.
Could you please help me?

2

You need to have the field field_node_type called somewhere in your view to use it as a token in rewrite results for a field. Value that you're trying to use in rewrite results should be available within replacement patterns for the field you're trying to configure.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.