/**
  * Returns a CachedTemplate object loaded from a plugin template
  * Plugins are different in the sense that they store their templates in the
  * plugins/xxx/templates, where 'xxx' is the plugin identifier
  *
  * @param pluginId The id of the plugin, which matches the name of a folder
  * under the plugins/ folder.
  * @param templateName Name of the template, without the .template extension
  * @param blogInfo
  * @return a CachedTemplate object
  */
 function PluginCachedTemplate($pluginId, $templateName, $blogInfo = null)
 {
     // define the template file name
     $templateFolder = TemplateSetStorage::getPluginTemplateFolder($pluginId);
     $templateFileName = $templateFolder . $templateName . '.template';
     $t = new CachedTemplate($templateFileName);
     $t->setTemplateDir($templateFolder);
     $t->assign('templatename', $templateName);
     $t->assign('admintemplatepath', TemplateSetStorage::getAdminTemplateFolder());
     $t->assign('plugintemplatepath', $templateFolder);
     // change a few things...
     $t = $this->_configureTemplateSettings($t, $blogInfo);
     return $t;
 }