So I am building an application that will be required to have multiple 'Base templates' which will be dynamically determined using the hostname. The page templates themselves will have the same content, it's just the container that will be different.
Rather than heading down the messier road of building in partials() or if statements within the base template itself, is there any way to dynamically reference a value using extends?
{% extends "../../data/company/" ~ "example" ~ "/templates/base.volt" %}
Returns an exception 'PhalconException: Syntax error, unexpected token ~ in \views\company/index.volt on line 1'
Attempting to use a variable like
{% extends baseName %}
Returns 'PhalconException: Syntax error, unexpected token IDENTIFIER(baseName) in \views\company/index.volt on line 1'
I did at one point try and use the 'setMainView' method against the view service in my bootstrap file like
$view->setMainView(sprintf("../../data/company/%s/templates/base", $variableName);
and removing the 'extends' within my template(s), but then the template blocks themselves aren't processed, and everything renders from the content() function.
I'm 99% sure the functionality just is not there yet, is the volt project itself open source like Phalcon? I couldn't seem to find the repository.