Sha256: ae4c5c158a2d7e3cff7f27dfe223c9169956af84ece6b7fcbba8468d1917bd07

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

<a name="image_drop"></a>
<h3>Paperclip Objects</h3>
<p>If a paperclip attribute is exposed through other drops, it will automatically be usable in templates.</p>
<p>Any styles defined for the paperclip attribute will be exposed as size attributes in addition to the <strong><em>original</em></strong> size.</p>

<p>Each size field has additional <strong>url</strong>, <strong>width</strong> and <strong>height</strong> attribute as well:</p>

<pre>
{{ image.original.url }}
{{ image.large.url }}
{{ image.large.width }}
{{ image.large.height }}
</pre>

<a name="asset_drop"></a>
<h3>Asset</h3>
<ul>
  <li><span class="attribute">meta</span> - Meta fields can be accessed from the meta attribute. Meta data is associated with an asset when creating or editing them.</li>
  <li>
    <span class="attribute">image</span> - Gives you access to the image fields if the asset an image.  See the <a href="#image_drop">paperclip objects</a> drop for available fields.</a><br/>
    The image attribute only contains the <em>'original'</em> size in addition to a <em>'custom'</em> size if custom dimensions were specified for the image.
  </li>
</ul>

<pre>
{{ asset.meta.field_name }}
{{ asset.meta.location }}

{{ asset.image.custom.url }}
{{ asset.image.original.url }}
</pre>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
liquid_cms-0.3.2.0 app/views/cms/documentation/_cms_drops.html.erb
liquid_cms-0.2.2.0 app/views/cms/documentation/_cms_drops.html.erb
liquid_cms-0.2.1.1 app/views/cms/documentation/_cms_drops.html.erb
liquid_cms-0.3.1.0 app/views/cms/documentation/_cms_drops.html.erb
liquid_cms-0.2.1.0 app/views/cms/documentation/_cms_drops.html.erb