joomla component development with Ajax queries

前端 未结 3 2116
悲&欢浪女
悲&欢浪女 2021-01-15 15:26

I have a PHP script used for AJAX queries, but I want them to be able to operate under the umbrella of Joomla\'s (2.5) framework so I can have session id\'s, user id\'s etc

3条回答
  •  长情又很酷
    2021-01-15 16:17

    if you create a component you can create new view for raw queries for example compoments/com_yourcomponent/views/ajax/view.raw.php and put all logic and output in there url will be index.php?option=com_yourcomponent&view=ajax&format=raw

    or

    you can to create new method in controller.php with exit() after print information and url will be index.php?option=com_yourcomponent&task=ajax

提交回复
热议问题