owen2345
2/10/2016 - 11:42 AM

Camaleon CMS Custom Fields

Camaleon CMS Custom Fields

<h1><%= @post.the_title %></h1>
<div>
 <%= raw @post.the_content %>
</div>
<hr>
<h2>Custom fields here:</h2>
<div>
    Author name: <%= @post.get_field('author-name') %>
</div>

<div>
    Author photo:
    <%= image_tag(@post.get_field('author-photo', 'http://camaleon.tuzitio.com/media/132/slider/slide33.jpg')) %>
</div>

<div>
    Author Comments: <%= @post.the_field('author-details') %>
</div>

<h4>Photos</h4>
<ul>
    <% @post.get_fields('photos').each do |url| %>
        <li><%= image_tag(url, style: 'width: 50px; height: 50px;') %></li>
    <% end %>
</ul>