Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing skin/theme of Drupal 7 widgets (fields)

Posted on 2013-05-17
7
Medium Priority
?
408 Views
Last Modified: 2013-05-28
Hello Experts,

I've tried searching for a way to change the appearance (skin/theme) of my content type widgets (fields), but I'm not having any luck.

Anyone know how that may be accomplished?

I only want to control the look of the widget, not the functionality.

Thank you.
0
Comment
Question by:Modifier1000
  • 4
  • 2
7 Comments
 
LVL 9

Expert Comment

by:scifikillr
ID: 39175527
The look and feel of fields can be controlled in a number of ways, depending on where you're trying to affect it.

Node: If you're trying to theme a field for a node, you can create a node template in the theme. This will help you with this process: http://drupal.org/node/1089656

View: If you're trying to theme a field for a view, you can create a view template. From the View edit perspective, click the 'Advanced' fieldset and click the Theme "Information" link to see template suggestions.

There are also a few modules which may assist with theming. One is Display Suite. This module (along with a few of its optional addon modules) will allow you to control positioning and general look/feel of the fields in the page. Support addon modules let you interact with different objects, such as nodes, comments, etc.
0
 
LVL 9

Expert Comment

by:scifikillr
ID: 39175532
This may be easier to assist with if you can provide some information on what field type you're trying to modify, and what modules (if any) are being used to provide this functionality right now (obviously CCK, but speaking more to a specific module that provided the field, if that's the case).

Also, a URL to the page in question would be quite helpful, as would a description of what you're trying to change it to.
0
 
LVL 17

Expert Comment

by:nanharbison
ID: 39175568
You could do this with CSS. But if your theme doesn't provide an empty CSS file that you can use to override styles in the theme CSS, then you can create one.
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
LVL 9

Expert Comment

by:scifikillr
ID: 39176184
To clarify: Use of CSS may be entirely possible, but it depends on what you're trying to do. Certain look/feel improvements would be considered to be a bit hacky in CSS (for instance, using position:absolute to place an element somewhere that could be very easily achieved by simply moving it by a few lines in the .tpl.php file)
0
 

Author Comment

by:Modifier1000
ID: 39185536
@scifikillr

Here is what I'd like to accomplish plus a similar look to the other widgets/components...see attached.
different-widget-skin.png
0
 
LVL 9

Accepted Solution

by:
scifikillr earned 2000 total points
ID: 39187946
Select lists are among a group of fields that are rendered differently depending on the browser that is being used. They can be overridden, but this can be a difficult process, especially for someone that's never done it before.

There's a good article here, which shows some basic methods of styling these field types.
0
 

Author Closing Comment

by:Modifier1000
ID: 39201329
Thank you.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question