Thanks for the quick response!
I don't have any problems with the Javscript, I'm using the jQuery .load() function to get done what I need and it works like a charm. What I need is a PHP-plugin for modx!
It should check as early as possible in the processing of the page whether the Client has set "$_SERVER('HTTP_X_REQUESTED_WITH')" to "xmlhttprequest". This would be the case, if I request the URL with an asynchronous request by jQuery. This is what the small snippet above was about, just to be able to differentiate between normal client requests and AJAX-requests.
The functionality should be that if the page is requested via AJAX, modx should send only the content of the content-variable of the requested page, with no templating going on at all. This way it would be easy to insert this via js into the already loaded page.
It would be something very similiar to this:
https://forums.modx.com/index.php?topic=37430.0%3bwap2
My problem is, that I really don't know:
- a) on which event my code should be code, and
- b) how i can change the normal output to only the contens of the current pages content variable
I really can't find it anywhere, which api-calls i will have to use in revo. Lack of documentation and probably also a bad search.
Thanks anyway for the quick help. If anyone can hive me a hint on the api calls i would need, please post here!