See this
http://sottwell.com/how-templates-work.html
You can log into my site’s manager and look around at how a (rather simple) live site is done.
Basically you have a template with the HTML skeleton of your pages. Content is done by editing individual resources, where the page title, a long title and other information is input, plus a field for entering the main content of this page. Each resource can be assigned a different template; the vast majority of sites only need one template.
Dynamic items like "news" or "blog" listings and menus are handled by "snippets" of PHP code that gather up the information from the various resources and generate lists as required. These snippets are highly configurable and use their own mini-templates to customize the output of each item in their listing.
MODx includes a user management system with roles to specify what a user can do, and user groups connected to document groups to specify which resources the user can access.
MODx makes no restrictions whatsoever on the javascript you use; just add the script tags to your template’s HTML as you would to any flat-file web page. Some caution needs to be taken to avoid conflicts with other javascript in use, but this holds true for any web page using javascript.
Links work with or without using a menu. The menu sippets are just a convenience for automating the creation of site menus; they aren’t necessary at all if you don’t need to indicate an "active" state in a hand-coded menu. MODx has a "friendly URLs" feature so without it a page’s URL will be domain.com/index.php?id=xx (where xx is the resource’s numeric ID), with it on the URL will be domain.com/alias.html (the suffix can be specified in the site configuration). This has an added benefit of allowing some pages to be totally hidden from non-manager visitors; pages can be "published" or "unpublished". Even if you put a URL directly in the browser address bar, an unpublished resource cannot be seen, except by logged-in Manager users. And even this feature can be permitted or denied in the "role" assigned to a user.