diff --git a/kernelbooking.php b/mod_kernel_booking.php similarity index 80% rename from kernelbooking.php rename to mod_kernel_booking.php index 8539525..ff63bbb 100644 --- a/kernelbooking.php +++ b/mod_kernel_booking.php @@ -16,4 +16,4 @@ $moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx')); -require JModuleHelper::getLayoutPath('mod_kernelbooking', $params->get('layout', 'default')); +require JModuleHelper::getLayoutPath('mod_kernel_booking', $params->get('layout', 'default')); diff --git a/kernelbooking.xml b/mod_kernel_booking.xml similarity index 90% rename from kernelbooking.xml rename to mod_kernel_booking.xml index f7121b8..549de4c 100644 --- a/kernelbooking.xml +++ b/mod_kernel_booking.xml @@ -13,7 +13,8 @@ installer.php - kernelbooking.php + tmpl + mod_kernel_booking.php index.html @@ -41,14 +42,16 @@ diff --git a/tmpl/default.php b/tmpl/default.php index ded8c5b..7392772 100644 --- a/tmpl/default.php +++ b/tmpl/default.php @@ -14,6 +14,16 @@ defined('_JEXEC') or die; +$detailID = $params->get('detail_id'); +if ($detailID == 0 || !in_array($params->get('page'), ['detail', 'calendar'])) { + $detailID = 'null'; +} + +$category = $params->get('category'); +if ($category == 0 || $params->get('page') != 'search') { + $category = 'null'; +} + ?>
@@ -23,8 +33,8 @@ client: 'get('client'); ?>', el: '#kernel-booking', page: 'get('page'); ?>', - detailid: 'get('category_id'); ?>', - category: 'get('detail_id'); ?>' + detailid: , + category: })