有什么方法可以轻松地将 CSS 迁移到 joomla 样式类 CSS 吗?

发布于 2024-09-06 02:03:44 字数 624 浏览 2 评论 0原文

我正在尝试将设计师给我的 CSS 文件集成到 Joomla 1.5 中的新模板中。但joomla生成的HTML内容与设计者想象的原始CSS不同。是的,它使用 div、类和 id,但我不确定迁移和实现它的最佳方法是什么。

有没有办法告诉 Joomla 生成表格、div 或

span,而不是默认布局?或者指定一些额外的类?

我发现 Joomla 默认安装附带的模板的布局略有不同,但类相同,一个使用表,一个使用 div。

当我创建新模板时,它会默认生成

 <jdoc:include type="component" />

“我主要关心的是这部分”中的表。其余的我什至可以让它成为非动态的,但硬编码的,我试图使菜单动态。当包含一个模块时,我看到你可以指定一种样式,但它并没有真正包含它:

<jdoc:include type="modules" name="right" style="MyClassName" headerLevel="3" />

而且我不知道 headerLevel var 的用途。

有人提示吗?

I'm trying to integrate a CSS file that my designer gave me into a new template in Joomla 1.5. But the HTML content generate by joomla is different than the original CSS that the designer thought. Yes, it uses divs and classes and ids but I'm not sure what the best approach to migrate and implement this is.

Is there any way to tell Joomla to generate tables, divs or <p> spans, instead of the default layout? Or to specify some additional classes?

I've seen that the templates that come with the default installation of Joomla have slightly different layouts, but the same classes, one using tables one using divs.

When I create my new template it generates by default tables in the

 <jdoc:include type="component" />

My main concern is this part. The rest I can even let be NON dynamic, but hardcoded, I tried to make the menu dynamic. When including a module I've seen you can specify a style, but it doesn't really include it:

<jdoc:include type="modules" name="right" style="MyClassName" headerLevel="3" />

And I don't know what the headerLevel var is for.

A hint anyone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

伴梦长久 2024-09-13 02:03:44

所有组件和模块都可以在模板文件夹中覆盖。如果您查看 beez 文件夹,您将看到所有硬编码的覆盖文件。您可以将它们更改为您需要的任何 HTML。您可能发现的唯一问题是返回模板的数据格式不正确,在这种情况下您需要破解模型本身。

但是,您应该能够更改覆盖中的 html 来实现您需要的大部分内容。

style="MyClassName" 指的是模块接收的“包装”。 beez 模板中的选项在 templates/yourtemplate/html/modules.php 中设置。您可以通过查看代码来了解其工作原理。

All of the components and module can be overridden within the templates folder. If you look in the beez folder you will see all of the override files which are hardcoded. You can alter these to have whatever HTML you need. The only problem you might find is when the data coming back to the template is not in the correct format, in which case you would need to hack the model itself.

However, you should be able to change the html in the overrides to achieve most of what you need.

The style="MyClassName" refers to the 'wrapping' that the module receives. Your options in the beez template are set in templates/yourtemplate/html/modules.php. You be able to work out how this works from looking at the code.

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