Using Attached Files in Mephisto

June 14th, 2007

The Mephisto blog engine has added the facility to attach files to an article rather than just embedding in the article content itself.

I’ve now added some code which will show an attached image at the start on an article. You can do this by editing the home.liquid template to something like this:


{% if article.assets.size != 0 %}
  {% for asset in article.assets %}
    {% if asset.is_image %}
      <p class="image"><img src="{{ asset.path }}"/></p>
    {% endif %}
  {% endfor %}
{% endif %}

Sorry, comments are closed for this article.