From ecb274601c1c9d8cb93fc3bd7bca0094ad639c21 Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Tue, 21 May 2024 20:13:39 +0200 Subject: [PATCH 1/5] Add new website page types: library, service (#29721) * library service page types * Update index.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/html.formwebsite.class.php | 7 +- htdocs/core/lib/website.lib.php | 4 + htdocs/core/lib/website2.lib.php | 193 ++++++++++--------- htdocs/public/website/index.php | 14 +- htdocs/website/index.php | 29 ++- 5 files changed, 152 insertions(+), 95 deletions(-) diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index 98d325c272b..a45a167195b 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -135,7 +135,12 @@ class FormWebsite $lasttypecontainer = ''; while ($i < $num) { $obj = $this->db->fetch_object($result); - + if (in_array($obj->typecontainer, array('library', 'service'))) { + if (!getDolGlobalString('WEBSITE_ADD_PAGE_TYPE_PHPLIB')) { + $i++; + continue; + } + } if ($obj->typecontainer != $lasttypecontainer) { $out .= '