Hi johnjohn22,
you could try the following steps:
(I assume that
www.domain.com/ is the root of your main MODX installation, and you have a published start page "
Home" in it.)
(1)
Install
ContextRouter via the Package Management.
(2)
On the server, using some FTP Client, create a subdirectory
/dev/ below the root directory.
(3)
Copy the files
index.php and
config.core.php from the root directory to this subdirectory
/dev/.
(4)
Modify the file
/dev/index.php in the following way:
Near the end of the file you find the lines
/* Initialize the default 'web' context */
$modx->initialize('web');
Replace them by
/* Initialize the 'dev' context */
$modx->initialize('dev');
(5)
In the file
/dev/config.core.php, replace the line
define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
by the line
define('MODX_CORE_PATH', dirname(dirname(__FILE__)) . '/core/');
(Because from the subdirectory's "dev" point of view the core is to be found one level higher.)
(6)
In the MODX Manager, create the Context '
dev'.
Create a resource "
Dev-Home" under this context and publish it.
(7)
Go to the Context Settings panel of the Context '
dev' and create these settings:
key: site_url -> value: http:/ /www.domain.com/dev/ (omit the blank between / /)
key: base_url -> value: /
key: http_host -> value: www.domain.com/dev
key: site_start -> value: ## (= the ID of the start page "Dev-Home" in the context 'dev')
(8 )
Change to the Context '
web', go to its Context Settings panel and create these settings:
key: site_url -> value: http:/ /www.domain.com/ (omit the blank between / /)
key: base_url -> value: /
key: http_host -> value: www.domain.com
key: site_start -> value: ## (= the ID of the start page "Home" in the context 'web')
That should do it.
When you now (after a refresh of the cache) launch the URL
www.domain.com/ you should see the page "
Home", and when you launch the URL
www.domain.com/dev/ you should see the page "
Home-Dev". (Hope I'm right...)
Good luck!