This manual is being depreciated. Much of the information here is out of date.

The new Jomres Documentation, updated in 2022, can be found at Jomres.net/documentation.

Using the Jomres Framework

How do you use the Jomres Framework in your own client's code?

As a developer working on your clients sites it's quite possible that you will want to use some of the pages generated by Jomres, but in your own scripts.

The best way to do that is by using the "Alt Init" plugin (note, you will need a license to be able to install this plugin through the Jomres Plugin Manager).

if (!defined('_JOMRES_INITCHECK'))
define('_JOMRES_INITCHECK', 1 );

if (!defined('JOMRES_ROOT_DIRECTORY')) {
if (file_exists(dirname(__FILE__).'/../../jomres_root.php')) {
require_once (dirname(__FILE__).'/../../jomres_root.php');
} else {
define ( 'JOMRES_ROOT_DIRECTORY' , "jomres" ) ;
}
}

require_once(JOMRES_ROOT_DIRECTORY.DIRECTORY_SEPARATOR.'core-plugins'.DIRECTORY_SEPARATOR.'alternative_init'.DIRECTORY_SEPARATOR.'alt_init.php');

Once you have done that you can then use Jomres scripts to pull in snippets rendered by Jomres and reuse that output in your own code, such as described in the Using Shortcode code from minicomponents

article.