tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/14701-velocity-child-paths-cssCascade CMS: Discussion 2018-10-18T20:37:22Ztag:help-archives.hannonhill.com,2010-02-09:Comment/351320862014-10-30T20:58:51Z2014-10-30T20:58:51ZVelocity - Child Paths & CSS<div><p>I tried the following, but this is in a
<strong>Format</strong>.</p>
<pre>
<code>background: url("[system-asset]/test1${img}[/system-asset]");</code>
</pre></div>Christag:help-archives.hannonhill.com,2010-02-09:Comment/351320862014-10-31T13:52:29Z2014-10-31T13:52:29ZVelocity - Child Paths & CSS<div><p>Hi Chris,</p>
<p>Referencing the image's path, or link, within a
<code>[system-asset]</code> pseudo tag should do the trick.
Curious, where is the <code>/test1</code> coming from in your
example? When you have a moment, try the following and let me know
how it works out. Also, double check to make sure you are setting
the <code>$img</code> variable correctly.</p>
<pre>
<code>#set ( $img = $page.getChild("system-data-structure").getChild("banner_image").getChild("link").value )
.page-intro {
background: url("[system-asset]${img}[/system-asset]");
background-size:cover;
}</code>
</pre>
<p>Note: I changed <strong>path</strong> to <strong>link</strong>
so you can properly handle situations where the image is from
another Site.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/351320862014-10-31T21:16:07Z2014-10-31T21:16:07ZVelocity - Child Paths & CSS<div><p>You sir, are a gentleman and a scholar. Worked like a
champ!!!</p></div>Chris