From 420b74afaa1a222b3fc17c8bf91b2890aef3232d Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 22 Feb 2011 23:39:42 +0100 Subject: try to fix a variable problem --- templates/vhosts/default.erb | 5 ++++- templates/vhosts/partials/header_default.erb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb index 509f660..4a7d7f4 100644 --- a/templates/vhosts/default.erb +++ b/templates/vhosts/default.erb @@ -1,4 +1,7 @@ -<%- [:normal,:ssl].each do |vhost_part| %> +<%- [:normal,:ssl].each do |vhost_part| + # we need this variable in included templates + @vhost_part = vhost_part +%> > <%= scope.function_template('apache/vhosts/partials/header_default.erb') %> diff --git a/templates/vhosts/partials/header_default.erb b/templates/vhosts/partials/header_default.erb index 13eeea1..7d43bde 100644 --- a/templates/vhosts/partials/header_default.erb +++ b/templates/vhosts/partials/header_default.erb @@ -1,5 +1,5 @@ Include include.d/defaults.inc - <%- if vhost_part == :ssl %> + <%- if @vhost_part == :ssl %> Include include.d/ssl_defaults.inc <%- end %> -- cgit v1.2.3