Also talking about connecting the head and the basement on a moduleJohnCMS v 6.x.x
<?php
const _IN_JOHNCMS = 1;
$textl = 'Page header text';
require_once '../incfiles/core.php';
require_once '../incfiles/head.php';
// Code
require_once '../incfiles/end.php';
And how to write modules - it depends on your preferences.