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

  • Home
  • SEARCH
  • 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 1045005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:55:08+00:00 2026-05-16T15:55:08+00:00

A have a view created with Drupal’s Views module, and have given it a

  • 0

A have a view created with Drupal’s Views module, and have given it a Block display. It has the following fields:

  • first_name
  • last_name
  • professional_title

I understand that I can create a “[viewname]-block.tpl.php” file to provide a custom theme for this particular block, overriding the generic block.tpl.php template file. Within this [viewname]-block.tpl.php file, how can I pull out individual fields (eg, First name) so that I may theme them individually, giving them different classes? I’ve taken a look at $block, which yields $block-content, containing all fields, but this is as granular as I have managed to go so far.

Any help is appreciated.

  • 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-16T15:55:09+00:00Added an answer on May 16, 2026 at 3:55 pm

    Go into the Views UI and navigate to the block view you’re trying to theme.

    Under basic settings (at the bottom of it in fact) you’ll see a Theme Information link. Click it.

    I’m copying and pasting the official description of what that does:

    “This section lists all possible templates for the display plugin and for the style plugins, ordered roughly from the least specific to the most specific. The active template for each plugin — which is the most specific template found on the system — is highlighted in bold.”

    So find the template for the field you want to theme and click the link for it – you’ll get code to copy and paste. The code will be really generic, but there are notes in the generated tpl file about how to pull more specific object data.

    Hope that helps

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

Sidebar

Related Questions

I'm a drupal newbie... I have created a block with View Module to list
I'm a drupal newbie (mean it :) I have a Block, created with View
Using Drupal 7, using views i have created a related 'videos' block for various
In Drupal 6, I have created a view, displayed as a block. My goal
I am developing a module to display video. I have created a view so-called
I have created View A and View B. My window has View A displayed
I have created navigaton view using Sencha touch 2. Navigation view has list component
I have a Drupal 6 site where I've created a view that shows a
I'm trying to create a gift wrapping module for Drupal commerce. I have created
i have build an About the Author views block in Drupal. This is linked

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.