changed the flow
This commit is contained in:
parent
b7c5ced470
commit
a4454f0c0e
1 changed files with 19 additions and 6 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue