Joomla模块:如何从后端解析值并在前端发布它们 [英] Joomla Module: how to parse the values from backend and post them at frontend

查看:90
本文介绍了Joomla模块:如何从后端解析值并在前端发布它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在现有模块中进行小编辑。该模块解析给定类别的文章并在索引处发布em。我想添加另一个元素(ID),以便用户可以从不属于某个类别的文章中提供id并发布该文章。



Im completly new to module发展,甚至最简单的任务对我来说现在看起来非常复杂。所以我在我的xml清单文件中创建了文本字段,我可以添加一个值,这是我的问题。



如果我没有弄错,列表类型字段正在保存在数据库中的某个位置,您可以将em调用作为具有默认元素的列表进行检索。



  $ params  = JFactory :: getApplication() - > getParams(); 
$ model-> setState(' params',$ appParams);
$ modell-> setState(' list.start');



它可能听起来很愚蠢,但我没有找到任何关于文本字段的内容!或者也许我没理解它。所以我希望有人能够让我知道如何通过genneraly检索用户在后端提供的值,这样我们就可以在前端回复em。



如果有人可以推荐我的话一本书或其他可以帮助我开发joomla模块的东西(我尝试过Joomla Development A Hagn Graf的初学者指南和学习Joomla 3扩展开发第3版,但他们并没有帮助我很多,你可以看到:D)



感谢您的时间。

解决方案

params = JFactory :: getApplication() - > getParams( );


model-> setState(' params'

appParams);

i want to do a small edit in an exististing module. That module parses articles from the given categories and post em at index. I wanted to add another element (ID) so the user could give the id from an article that isnt in a category and post that Also.

Im completly new to module development and even the easiest task seems really complex for me right now. So i created the text field at my xml manifest file, and i can add a value and here comes my question/s.

If im not mistaken the list type fields are getting saved somewhere in the db and you can retrieve em calling as a list that has default elements.

$params = JFactory::getApplication()->getParams();
$model->setState('params', $appParams);
$modell->setState('list.start');


It maybe sounds dumb but i didnt find anything about text fields !! Or maybe i didnt understood it. So i would like someone to enlight me on how we genneraly retrieve the values user gives at backend so we can echo em at frontend.

And also if someone could recommend me a book or something that could help me with joomla module development ( I tried Joomla Development A beginners Guide by Hagen Graf and Learning Joomla 3 Extension Development 3rd Edition , but they didnt help me alot as u can see :D )

Thanks for your time.

解决方案

params = JFactory::getApplication()->getParams();


model->setState('params',


appParams);


这篇关于Joomla模块:如何从后端解析值并在前端发布它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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