From a4454f0c0e98862cdadc79e6aa1e546beb6b68dd Mon Sep 17 00:00:00 2001 From: enouplus <62318261+enouplus@users.noreply.github.com> Date: Tue, 9 Feb 2021 22:26:35 +0530 Subject: [PATCH] changed the flow --- bl-themes/alternative/index.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/bl-themes/alternative/index.php b/bl-themes/alternative/index.php index 86cfb118..8be43997 100755 --- a/bl-themes/alternative/index.php +++ b/bl-themes/alternative/index.php @@ -36,11 +36,24 @@ // $WHERE_AM_I variable detect where the user is browsing // If the user is watching a particular page the variable takes the value "page" // If the user is watching the frontpage the variable takes the value "home" - if ($WHERE_AM_I == 'page') { - include(THEME_DIR_PHP.'page.php'); - } else { - include(THEME_DIR_PHP.'home.php'); - } + if ($WHERE_AM_I == 'page') + { + + $template=$page->template(); + #suppose if the template is product.php + if(!empty($template) and file_exists(THEME_DIR_PHP.$template)) + { + include(THEME_DIR_PHP.$template); + } + else + { + include(THEME_DIR_PHP.'page.php'); + } + } + else + { + include(THEME_DIR_PHP.'home.php'); + } ?> @@ -56,4 +69,4 @@ - \ No newline at end of file +