Phil Sturgeons Theme Release Library

Even though PyroCMS is a great CMS to use, and I highly recommend that someone and everyone use it when it provides.

However, my situation requires a custom CMS, which has quite a bit of controversy, which I develop instead with some libraries that I see there that can be freely used. The main thing I'm working with right now is the Phil Sturgeons template library.

Now, since he obviously uses it for PyroCMS. I am trying to combine with the file structure in the same way as with this, so that the template system runs smoothly.

I am currently in a predicament because I have my login form, cannot find a partial one, and I'm not quite sure why. When my panel calls partial metadata, it loads it just fine, but something happens and does not load when I call it in the login form.

Here is my current login controller, view of the login form and file structure to make sure it is configured correctly.   

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends Backend_Controller 
{
    public function __construct()
    {
        parent::__construct(); 
    }

public function index()
{ 
    $this->template
           ->set_layout(FALSE)
           ->build('login');
    }
}

<head>

    <!-- metadata needs to load before some stuff -->
    <?php file_partial('metadata'); ?>

</head> 

applications/
    themes/
        supr(my custom theme from template)/
            views/
                login.php
                partials/
                    metadata.php  

Any ideas from anyone?

+5
source share
1 answer

In your controller:

$this->template
    ->set_layout(FALSE)
    ->set_partial('metadata', 'partials/metadata.php')
    ->build('login');
}

Note the added call to set_partial.

In your opinion:

<?php echo $template['partials']['metadata']; ?>
+4
source

All Articles