Link to home
Create AccountLog in
Avatar of Modifier1000
Modifier1000Flag for United States of America

asked on

Changing skin/theme of Drupal 7 widgets (fields)

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.
Avatar of scifikillr
scifikillr

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.
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.
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.
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)
Avatar of Modifier1000

ASKER

@scifikillr

Here is what I'd like to accomplish plus a similar look to the other widgets/components...see attached.
different-widget-skin.png
ASKER CERTIFIED SOLUTION
Avatar of scifikillr
scifikillr

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you.