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

查看:103
本文介绍了向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更改了组件开发结构,DB注册等其他内容.任何有用的链接都可以很好地解释所有内容?

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天全站免登陆