Is the "registerSiteRoutes" hook screwing up my template path? This may be a bug...
I have a controller action which has been working great. It's a simple action with a single purpose... load a template with an internal value.
public function actionMyAction()
{
    $this-&gt;renderTemplate('myplugin/_mytemplate', array(
        'internalVar' =&gt; craft()-&gt;myPlugin-&gt;internalVar
    ));
}

When I call that action via a simple URL, everything loads flawlessly:

mywebsite.com/actions/myPlugin/myAction

Here's where it gets interesting...
So I just discovered the registerSiteRoutes hook. It looks awesome, and would make accessing my special page that much easier for a front-end user!
Here's how I implemented it in my MyPluginPlugin.php file:
public function registerSiteRoutes()
{
    return array(
        'myroute' =&gt; array('action' =&gt; 'myPlugin/myAction')
    );
}

The good news is, the route is properly followed, and my controller action gets loaded.
The bad news is, suddenly the template that's supposed to be loaded can't be found. :(

Template Error
Unable to find the template &quot;myplugin/_mytemplate&quot;.

So does anyone know, what's going on here? I know that the renderTemplate method does some minor rewriting of the template path, but why would it be different when accessing via a front-end route?
Craft will only check for templates in your plugin’s templates/ folder during CP and action requests. When you start routing to your controller action via a site-facing route, it’s no longer either one of those; it’s just a normal Site request. So you will need to point Craft to your plugin’s templates folder explicitly.

// Point Craft to this plugin's templates/ folder
$templatesPath = craft()-&gt;path-&gt;getPluginsPath().'myplugin/templates/';
craft()-&gt;path-&gt;setTemplatesPath($templatesPath);

// Render and output the template
$this-&gt;renderTemplate('_mytemplate', $variables);


Note that it will no longer be necessary to include your plugin’s handle in the template path.