How to style module?

发布于 2022-09-06 08:43:48 字数 280 浏览 18 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秋意浓 2022-09-13 08:43:48

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文