On 2014-01-25 15:11, Uplink_Coder wrote:
Until I have fixed my code and multiple string-includes are possible
you can get away withstring genIncludeString(string[] filenames) { Appender!string res; foreach(filename;filenames) res ~= "include "~filename; return res; }
If .dt file includes with wildcard works within a diet template, the
next step would be to append to the -J path of a project's dependencies,
every views folder in a project's dependencies.
e.g.
users/views/sidebarlogin.dt
users/views/loginpage.dt
blog/views/template.dt
blog/views/article.dt
someblogwebsite/views/homepage.dt
someblogwebsite/views/sidebar_about.dt
blog/views/template contains:
!!! 5
body
...
div#sidebar
include #{sidebar_*}
... etc
So when someblogwebsite is compiled, it wants the sidebarabout and
sidebarlogin to be included in this template. The only way I can
imagine this is by having dub automatically extend the -J./path
parameter of the users/ project dependency so that it contains all the
views folders available to the project.
So, this question may be more about dub's internals as well... and then
about the possibility of including a .dt file inside another.