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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.