0

I have a new theme in my bonfire application, called "stylish". There is an index.php file in this theme folder. When I try to load this theme, the layout specified in the index.php gets loaded. However, when I have a different layout file called "style.php", and try to load this, the header and footer files are not loaded at all. Should be very simple, I really am not sure what I am missing.

index.php in stylish theme:

    <?php echo theme_view('site_header');?> 
    <?php echo Template::message(); echo isset($content) ? $content : Template::content(); ?>
    <?php echo theme_view('footer'); ?>

The style.php layout in the stylish theme:

    <?php echo theme_view('site_header.php');?> 
    <?php echo Template::message(); echo isset($content) ? $content : Template::content(); ?>
    <?php echo theme_view('_footer.php');?>

The code that handles the rendering part in the controller is given below:

    public function testing() {
        Template::set_theme('stylish');
        Template::render('style');
        }
Ravi
  • 195
  • 15

1 Answers1

0

I just figured that the theme_view("custom_view"); should not include the extension .php. Not sure if anyone would have this problem, but if anyone does, hope this one helps.

the line <?php echo theme_view('site_header.php'); ?> should be <?php echo theme_view('site_header'); ?>

Ravi
  • 195
  • 15