Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exside/5073364 to your computer and use it in GitHub Desktop.
Save exside/5073364 to your computer and use it in GitHub Desktop.
<?php
// Use with OnLoadWebDocument
// Checks if in an Ajax call is made by checking if the value in X-Requested-With is given in the header.
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
$modx->documentContent = '[*content*]';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment