I've got custom content-type with several groups and fields.
I want to change default display of that content-type. In which file can I find appropriate code?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
You need to create that file - copy the node.tpl.php file to
and take it from there. Here's the relevant page from the handbook for Drupal 7
Alternatively, if you're just getting started with node templates, you may find it easier to install and enable the content templates module so you can add and modify node templates from the administrator backend:
The Content Template (a.k.a. ConTemplate) module allows modification of Drupal's teaser and body fields using administrator defined templates. These templates use PHP code and all of the node object variables are available for use in the template. An example node object is displayed and it is as simple as clicking on its properties to add them to the current template.
As I see your question is regarding styling of fields. You can take help from module Field Formatter Class. It lets you apply class for field on manage display.
If you are intended to have control over your field by help of template files, then copy field.tpl.php from $base_url/modules/field/theme and put that into your theme folder.
Change the name to have effect on your particular field like field--FIELDNAME.tpl.php, where FIELDNAME will be machine name of your field, for example field--body.tpl.php.
Insert/modify the CSS classes in there and style accordingly.
Try something like
hide($content['field_group-machine_name']['field_machine_name']) inside the template file for your content type, for all the fields that are before the fields you want to render; then render those fields using
print $content['field_group-machine_name']['field_machine_name'] and render the rest of the content.
By the way, why don't you just change the order in the content type display?