Created
February 10, 2016 11:42
-
-
Save owen2345/b58fb66549efeff810c5 to your computer and use it in GitHub Desktop.
Camaleon CMS Custom Fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment