Solved

Changing skin/theme of Drupal 7 widgets (fields)

Posted on 2013-05-17
7
392 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now