Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6912227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:03:55+00:00 2026-05-27T09:03:55+00:00

Drupal 7 field collection – If I want to theme a node page which

  • 0

Drupal 7 “field collection” – If I want to theme a node page which has a “field collection”, how do I go about separating the fields for customization? It seems thus far that only print render($content[‘field_collection_name’]); outputs the result. The problem is that I can’t figure out how to isolate the fields for theming.

I’ve created a node–content_type.tpl.php for this purpose but now stuck dead in the water. Would really appreciate someone saving the day for me.

Solved as follows:

Some of the links from below are really very helpful so do look, though, I’ve done something like this –
Enter dsm(print_r($variables));on node to be rendered in my case node--content_type.tpl.php with field collection to find out the arrays and field values needed, then hide of course.

The styling part then would look something like this

<div>class="class-for-label-here">My Desired Label - <span class="my-field-class-here"><?php print render($content['my_desired_field_here']['#items'][0]['value']); ?></span></div>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:03:55+00:00Added an answer on May 27, 2026 at 9:03 am

    There’s a fairly good conversation about this same thing going on here:

    http://drupal.org/node/1155752

    Main answer is theming with template field–your-field-collection-name.tpl.php

    After that you just need to figure out how to retrieve the contents from the arrays and/or objects!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Drupal (v6.17) Content Type which includes a Taxonomy field. I want
Drupal 7 has the field group module which contains a horizontal_tab.js file. Inside this
I'm using drupal. I have a form which has a single field, the field
I've got a Drupal site which uses a custom field for a certain type
Drupal is giving me an error message which says : An illegal choice has
can I collapse the field in my edit-content page in Drupal ? For example,
I have a multi-value cck field in a drupal node. The field is called
Using Drupal on a project which I made custom node types in using the
I have a form field in Drupal which I need some help with. The
I want to add an email field to submit new comment form in Drupal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.