user194076
user194076

Reputation: 9017

How to style module?

How to style existing module in drupal 6 for a specific view? where to place files? in the module directory or in the views dierectory. I just need to override the style of the node. Thanks!

The second question: where do you place hook_form_alter functions? thanks!

Upvotes: 0

Views: 171

Answers (1)

Matt V.
Matt V.

Reputation: 9809

To override the style of a node, the default templates suggestions allow you to create a node-[type].tpl.php file in your theme directory. The [type] is the name of a specific content type you are overriding or theming. For instance, you could create a custom template for "Page" nodes in a node-page.tpl.php file. If you need more flexibility, you can create custom "suggestions". See Working with template suggestions for more details.

When creating new template files, make sure your theme already contains the base template file (see the note at the top of the Core templates and suggestions page, for more detail). Also, be sure to clear your theme cache, in order for any new template files to be detected.

Views can be styled separately from the nodes they contain. Views allows for a variety of template files to be customized, depending on what level you need to customize (view as a whole, row styles, field styles, etc). For more details, click on the Edit tab of a view you'd like to theme, look under the Basic Settings section and next to Theme, click on Information.

Like other hook functions, implementations of hook_form_alter are placed in a .module file. If your module is called "customized" your customized_form_alter function would typically be found in a customized.module file, in a /customized folder, under /sites/all/modules.

Upvotes: 1

Related Questions