开发者

How To Integrate Custom Functions Into Joomla!

开发者 https://www.devze.com 2022-12-13 14:18 出处:网络
I recently began looking into Joomla as a platform for developing websites.I\'ve read various articles, tutorials, etc.However, I still have\'t read anything related to creating dynamic content.For ex

I recently began looking into Joomla as a platform for developing websites. I've read various articles, tutorials, etc. However, I still have't read anything related to creating dynamic content. For example, s开发者_运维百科uppose I need to create a table for hotels, insert data and then retrieve and display that data, how would I go about doing this? I assume I would need to create my own Joomla Plugin. Is that correct? If not, then how are custom functions, such as database queries integrated?

Thank you in advance.


Yes, you create your own Joomla extension (extensions in joomla are divided in Components, Modules and Plugins. Learn their differences) to achieve your specific goals. You have articles, menus, sections and etc in the core, but if you want new features, you have to develop your own or search Joomla's Extension Directory.

Joomla has APIs to interact with the plataform itself, such as database queries. Read it's developer documentation to get more information.


For basic PHP code, there is a nice plugin called Add PHP, which lets you include another PHP file.

Otherwise you'll want to create a Joomla component. Here's a brief tutorial I wrote for creating Joomla components quickly and easily. It doesn't follow the proper conventions for creating components, but if you just want to run a bit of custom PHP then that's the easiest way.

There's also a really good tutorial on the Joomla docs site if you want to build a full component and make full use of the framework.


joomla is pretty good platform for developing medium size site, but if you want something simple/lightweight there are other choices(Kohana is very lightweight).


One of the great advantages of Joomla is that it has a large number of extensions made by third party developers. You mentioned hotels. If that means you need to handle reservations then there is an existing extension. If that means you want to make a directory of hotels, then there is an extension for that too. If it means you want to do reviews, there is yet another extension you could start off with. And there are now content construction kits that will allow you to create types of content items without understanding anything about databases. So, very often, you save yourself a lot of time using and possibly modifying existing extensions. See the JED and become inspired!


this task can be done pretty simple. Joomla component extension is the correct fit for your requirement, adding, editing, deleting and selecting. As you are a beginner for joomla then it will take more time to build component so, there is an automatic component creator is available for creating a component without writing single line of code. But this component creator is a paid service, if your component needs more than one table. I think, currently one table is enough for your requirement. check out this link component creator

0

精彩评论

暂无评论...
验证码 换一张
取 消