0

I have a view called 'Profile' that shows some user fields on my users' profile pages. I'm using the Zen theme and I'd like to change the way these fields are displayed.

As a total newbie in theming, I don't have a clue where to start. I read a lot about template files on the internet, but I don't know if that's what I'm looking for. I'm not asking for help with the CSS code, but for the place where I should put it.

Which files should I adapt?

1 Answer 1

0

When you go to the view, open the advanced section - near the bottom is a link called theme: information.

This lists all the potential files you COULD adjust to tweak the output of the view. Some are very generic, and some specific to the view you are looking at - in general if you only want to theme the one view, choose a file name with your specific view name in it. Exactly which file(s) need to adjusted depends on the kind of tweaking you want to accomplish. These files (i.e. views-view-profile--page.tpl.php ) would then be placed in the theme directory (i.e. /sites/all/themes/zen) unless the theme uses a sub-directory for template files - a simple look through should tell you where they are found for each theme.

2
  • Thanks for your answer. I know theming works via template files, but I'm not used to working with them and as far as I've understood now, one can only use PHP and HTML in them. But what must I do when I'd like to change a view's background colour, for example? Of course I can work with CSS, but I don't know where to put the code.
    – Jeroen
    Commented May 3, 2014 at 12:30
  • Each theme will have at least one CSS file, usually something like style.css. Once you locate that, add a custom class for your specific view to the end. Go to your view, under the advanced tab, CSS Class: add the class you just created in the style.css file here.
    – Geoff
    Commented May 3, 2014 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.