Skip to content

Instantly share code, notes, and snippets.

@chucktrukk
Created November 18, 2009 22:17
Show Gist options
  • Save chucktrukk/238316 to your computer and use it in GitHub Desktop.
Save chucktrukk/238316 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