向 Joomla 1.7 com_content 添加新的图像字段 [英] Add new image field to Joomla 1.7 com_content

查看:14
本文介绍了向 Joomla 1.7 com_content 添加新的图像字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对 Joomla 1.7 的 com_content 组件进行一些更改关于 Joomla 1.7 特定主题的文档并不多

I'm trying to make some changes to com_content component of Joomla 1.7 There are not many docs on specific topic for Joomla 1.7

也许你可以帮我解决这个问题.

Maybe you could help me out on this one.

我想在 com_content 中为额外图像设置一个单独的字段,特别是精选"视图.

I want to have a separate field for extra image in com_content, specifically to Featured view.

在管理员部分,我设法添加了该字段 - 只是在 html 中,然后添加到 xml 文件中,最后添加到 DB.

In the administrator's part I managed to add the field - just in html, then into xml file and finally to DB.

现在我正在尝试在我的特色文章的自定义 html 视图中显示该记录.

Now I'm trying to get that record displayed in my custom html view for Featured articles.

我只是使用了简单的代码 echo $this->item->addimage; 但不幸的是它没有显示.

I just used simple code echo $this->item->addimage; but unfortunately it's not displayed.

有什么想法可以实现吗?

Any ideas how to achieve that?

谢谢!

还有一件事,据我所知,组件开发结构、数据库注册等,在 Joomla 1.7 中发生了变化.任何有用的链接,所有内容都得到了很好的解释?

And one more thing, as far as I have noticed, component development structure, DB registration and so on, has been changed in Joomla 1.7. Any helpful link(s) where everything is explained well?

推荐答案

com_content 真的不再是在 joomla 中创建可变内容的方式了.自曼波时代以来,它仍然是相同的不灵活代码.您应该尝试 K2、flexicontent 或我最喜欢的 ZOO 等解决方案.它们很容易学习,你可以用它们做很多很酷的事情.额外的字段?没问题,其中一些已经存在于 Joomla 1.7/2.5.破解核心总是不好的.主要是因为您丢失了更新路径.

com_content is really not the way for creating variable content in joomla anymore. It's still the same unflexible code since mambo days. You should try solutions like K2, flexicontent or my favourite ZOO. They are easy to learn and you can do lots of cool stuff with them. Extra Fields? No Proble., Some of them already exist for Joomla 1.7/2.5. Hacking the core is always bad. Mainly because you loose your update path.

这篇关于向 Joomla 1.7 com_content 添加新的图像字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆