Search

Could You write a short example of using AJAX in extension? I'm working on extension which adds some magic to administration pages, and i was wondering how to add AJAX calls there.

I checked source code of content.ajaxreorder.php and i see more or less what i need, but when i tried to create /extensions/mymodule/content/content.ajaxhello.php i kept getting 404 status code in JavaScript. Do i have to add that page to menu? How to add it without making it visible in real menu on administration pages?

/extensions/mymodule/content/content.ajaxhello.php

You would need to call this using /symphony/extensions/mymodule/ajaxhello/. Just go to that page directly in your browser and check there is some output.

Thanks Alistair.

It turns out that i typed path wrongly ("extensions" instead of "extension"). Also i forgot that page class name should be something like "contentExtensionMymoduleAjaxHello" instead of "contentAjaxHello" :).

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details