I'm working on my first subfolder-based Craft site, so I'm relying on Asset URLs based on the {{ siteUrl }}
variable. I cannot, however, manage to get them working. Any tags I add to the URL field in the control panel get printed literally (not parsed) in the template output.
My config.php looks like this:
return array(
'*' => array(
),
'foo.craft.dev' => array(
'siteUrl' => 'http://foo.craft.dev/',
'devMode' => true
),
'foo.bar.com' => array(
'siteUrl' => 'http://foo.bar.com/',
'devMode' => true
),
'example.com' => array(
'siteUrl' => 'http://example.com/foo',
'devMode' => false
),
);
My Logos Asset settings look like this:
And a relevant chunk of template looks like this:
<div class="logos">
{% for logo in logos.logoImages %}
<a href="{{ logo.websiteUrl }}" target="_blank" style="background-image: url({{ logo.geturl() }}); padding-top: {{ logo.getHeight() }}px; width: {{ logo.getWidth() }}px;">{{ logo.companyName }}</a>
{% endfor %}
</div>
The background-image
URL above renders out as {siteUrl}assets/logos/logo.gif
, which isn't parsed as I would expect.
What have I done wrong?