changed the flow

This commit is contained in:
enouplus 2021-02-09 22:26:35 +05:30 committed by GitHub
parent b7c5ced470
commit a4454f0c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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');
}
?>
<!-- Footer -->
@ -56,4 +69,4 @@
<?php Theme::plugins('siteBodyEnd'); ?>
</body>
</html>
</html>