$applicationInstance = Registry::getRegistry()->getInstance('app');
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
// Is the base path valid?
if (empty($templateBasePath)) {
$templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
// Absolute output path for compiled templates
- $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+ $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+ $templateBasePath,
+ $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+ ));
// Set the menu instance
$templateInstance->setMenuInstance($menuInstance);
* @return $fqfn Full-qualified file name of the menu cache
*/
public function getMenuCacheFqfn () {
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
// Get the FQFN ready
- $fqfn = sprintf('%s%s%s/%s.%s',
- $this->getConfigInstance()->getConfigEntry('base_path'),
- $this->getGenericBasePath(),
- 'menus/_cache',
+ $fqfn = sprintf('%s%smenus/_cache/%s.%s',
+ $this->getConfigInstance()->getConfigEntry('application_base_path'),
+ $applicationInstance->getAppShortName(),
md5(
$this->getMenuInstance()->getMenuName() . ':' .
$this->__toString() . ':' .