title: Symfony get Asset Name in Assetic output
body: <p>I generate my file with code like this:</p>
  <pre><code>{% block head_stylesheets %}
      {% stylesheets
          filter='?uglifycss'
          '@MyBundle/Resources/public/less/myfile.less'
      %}
      &lt;link href=&quot;{{ asset_url }}&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot;/&gt;
      {% endstylesheets %}
  {% endblock head_stylesheets %}
  </code></pre>
  <p>It dumps a file named like this: <code>c543k540_myfile_1.css</code></p>
  <p>This file is composed of the asset name followed by the filename: <code>{assetName}_{filename}.css</code></p>
  <p>How can I customize the output in keeping the asset name in the output?</p>
  <pre><code>{% block head_stylesheets %}
      {% stylesheets
          output=&quot;css/mynewfilename.{assetName}.css&quot;     // &lt;--- Here
          filter='?uglifycss'
          '@MyBundle/Resources/public/less/myfile.less'
      %}
      &lt;link href=&quot;{{ asset_url }}&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot;/&gt;
      {% endstylesheets %}
  {% endblock head_stylesheets %}
  
  </code></pre>
  <hr />
  <p><em>Update to clarify</em></p>
  <p>I know that if I use the name option, in prod it will compile to <code>myouputname.css</code> but what I would like to have in debug/dev environment is following the bellow code something like <code>myfile_myouputname_1.css</code></p>
  <pre><code>{% block head_stylesheets %}
      {% stylesheets
          name=&quot;myouputname&quot;     // &lt;--- Here
          filter='?uglifycss'
          '@MyBundle/Resources/public/less/myfile.less'
      %}
      &lt;link href=&quot;{{ asset_url }}&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot;/&gt;
      {% endstylesheets %}
  {% endblock head_stylesheets %}
  </code></pre>
  <p>Thanks for your reply.</p>