Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How can I correctly display a flexifield in node.tpl.php?
I want to put it in a non-standard position.
Thanks in advance.
Comments
Comment #1
Bob Moyce CreditAttribution: Bob Moyce commentedYou'll need both the Flexifield value and the value of the field from the Content Type Flexifield is referencing. Assume that field_my_flexifield is your Flexifield and field_my_text is a field within the Content Type:
If you want to work with several values at once, just run the array as follows:
Hope that helps.
Bob
Comment #2
sridarm CreditAttribution: sridarm commentedHello Bobmoyce ,
But that displays only the content excluding the styles that i have added for the text. I tried a lot of tricks but doesnt shows the style. Can you send the code . Its urgent please
Comment #3
Bob Moyce CreditAttribution: Bob Moyce commentedHave you tried using
['view']
instead of['value']
?Bob
Comment #4
khaleghian CreditAttribution: khaleghian commentedhello my dear
how can display an title or body from an reference node in an flexifield content type?
Comment #5
Nishchal CreditAttribution: Nishchal commentedThanks. It helped me a lot.