Joomla 1.5 / YooTheme“ZOO”的修改成分
首先我要提到的是,有一个 Zoo 开发者论坛,而且我已经使用过它。我在这里发帖的目的是,我通常会在几分钟或几小时内得到全面的答案,而开发论坛上的回复可能会很慢,或者由于人口基数较小而根本不存在。
我的问题是关于 Yootheme 的 ZOO 2.3.2。默认情况下,产品“Frontpage”似乎在项目顶部呈现一个“类别”框。如果关闭首页/模板配置中的所有可用选项(隐藏标题、计数、描述等),项目顶部仍会保留一个空框。
我已经能够通过解决以下文件来手动删除整个框:
media/zoo/applications/product/templates/default/frontpage.php,并注释掉第 84-92 行:
<!-- <?php
// render categories
if ($this->category->childrenHaveItems()) {
$categoriestitle = $this->application->getParams()->get('content.categories_title');
echo $this->partial('categories', compact('categoriestitle'));
}
?> -->
似乎应该有更多在管理后端执行此操作的雄辩方法,但我找不到。我错过了什么还是我的解决方案是最好的?
I'll start out by mentioning that there is a developer forum for Zoo and I have used it already. My purpose posting here is that I typically get a thorough answer within minutes or hours at SO, whereas the responses on dev forums can be slow or non-existent due to the smaller population base.
My question regards Yootheme's ZOO 2.3.2. By default, a product "Frontpage" appears to have a "Categories" box rendered on top of the items. If one turns off all the available options in Frontpage/Template configuration (hide Titles, Count, Descriptions, etc.), an empty box still remains on top of the items.
I've been able to manually remove the box in its entirety by addressing the following file:
media/zoo/applications/product/templates/default/frontpage.php, and commenting out lines 84-92:
<!-- <?php
// render categories
if ($this->category->childrenHaveItems()) {
$categoriestitle = $this->application->getParams()->get('content.categories_title');
echo $this->partial('categories', compact('categoriestitle'));
}
?> -->
Seems like there should be a more eloquent way of doing this on the admin backend, but I couldn't find one. Am I missing something or is my solution the best one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ZOO 旨在轻松修改内置模板以满足您的需求。 ZOO 模板应该被覆盖,就像 Joomla 使用模板覆盖一样。您无需编辑默认模板,只需创建一个执行您想要的操作的新模板即可。不应更改默认模板。
以下是 ZOO 模板的文档 - http://www.yootheme .com/docs/home/item/create-a-new-template
您无需编辑上面提到的文件,而是在此处创建一个新模板 -
media/zoo/applications/product/templates/YOUR-TEMPLATE-名称/frontpage.php
然后进行所有您想要的更改,而不会弄乱默认值。
ZOO is designed to easily be able to modify the built in templates to suit your needs. ZOO templates are meant to be overridden much like Joomla uses template overrides. Rather than editing the default template, you simply create a new template that does what you want it to. The default template should not be changed.
Here is the documentation on ZOO templates - http://www.yootheme.com/docs/home/item/create-a-new-template
Rather than edit the file you mention above, you make a new template here -
media/zoo/applications/product/templates/YOUR-TEMPLATE-NAME/frontpage.php
Then do all the changing you want without messing up the default.
有一个更简单的方法:首先,您必须确定什么叫“frontpage”项目。在 PURE yotheme 中,至少它是从“主菜单”中的“主页”调用的。因此,单击主菜单的“主页”按钮,然后在右侧菜单“参数(基本)”上,您只需选择“-选择应用程序-”而不是“frontpage”,就是这样。Frontpage 及其“框”现在消失了。至少它对我有用。
There is an easier way: First, you must identify what calls the item called "frontpage". In PURE yootheme at least it is called from "home" in the "mainmenu". So click "home" buton of the mainmenu, then over the right menu "Parameters(Basic)" you just chose "-select aplication-" instead "frontpage" and that's it.The Frontpage and its "box" are now gone. At least it works for me.