}
/**
+ * Set the layout template for the controller. Specify the name of the file in
+ * the /app/views/layouts directory without the .html extension
+ *
+ * <code>
+ * <?php
+ * ...
+ * public function _initialize()
+ * {
+ * $this->setLayout('application');
+ * }
+ * ...
+ * ?>
+ * </code>
+ *
+ * @param string $layoutName
+ */
+ protected function setLayout($layoutName)
+ {
+ $this->_useLayout = true;
+ $this->_layoutName = $layoutName;
+ }
+
+ /**
* Check if a render or redirect has been performed
* @return boolean
*/
protected function _template($name)
{
// append missing html
- if (!strstr($name, '.')) { $name .= '.html'; }
+ if (!strstr($name, '.')) { $name .= '.html.php'; }
if (!count($this->_templatePath)) {
throw new Horde_View_Exception('No template directory set; unable to locate ' . $name);