Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Add support for multiple templates dirs #29

@raxell

Description

@raxell

Can you add support for setting multiple templares dirs? Twig already support it, why don't add it to this lib?

Simply edit in Slim\Views\Twig:

/**
 * DEPRECATION WARNING! This method will be removed in the next major point release
 *
 * Get a list of template directories
 *
 * Returns an array of templates defined by self::$twigTemplateDirs, falls
 * back to Slim\View's built-in getTemplatesDirectory method.
 *
 * @return array
 **/
private function getTemplateDirs()
{
    if (empty($this->twigTemplateDirs)) {
        return $this->getTemplatesDirectory();
    }
    return $this->twigTemplateDirs;
}

/**
 * Sets an array of paths where to look for templates.
 * @param  string|array $directory
 */
public function setTemplatesDirectory($directory)
{
    $this->templatesDirectory = $directory;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions