Your question is not overly clear. I’m taking this as, for example, your template is rendering the content for page 1, but you want to insert the content from page 2 somewhere in the HTML?
What I would do is create a snippet that takes a resource ID as a parameter, looks up the resource from the database, and returns the content.
You will then be able to put
[[YourSnippetName? &docId=`2`]]
in your template.
Use the following code as guidance - it’s possibly not 100% correct and there’s no error or sanity checking so isn’t production-ready:
$c = $modx->newQuery('modResource');
$c->where(array(
'published' => true,
'deleted' => false,
'id' => $docId
));
$resources = $modx->getCollection('modResource', $c);
return $resources[0]->get('content');
Alternatively you might be able to use the getResources snippet from the modx Extras directory.