new property for the content_type: entry_template (previously named raw_item_template)

did committed Aug 31, 2015
commit 7c0ade8c50bf961acd3551f28b38948059543a24
Showing 3 changed files with 7 additions and 4 deletions
Gemfile +1 -1
@@ @@ -8,7 +8,7 @@ gem 'rb-fsevent', '~> 0.9.1'
gem 'therubyracer'
# Development
- # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'b2de77e', require: false
+ gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '2650a1c', require: false
# gem 'locomotivecms_coal', github: 'locomotivecms/coal', ref: '32b2844', require: false
# gem 'locomotivecms_common', github: 'locomotivecms/common', ref: '3046b79893', require: false
generators/content_type/app/content_types/%slug%.yml.tt +3 -0
@@ @@ -32,6 +32,9 @@ order_by: manually
# position: 1 # position in the sidebar menu
# hidden: false # hidden for authors?
+ # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below:
+ # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template
+
# A list describing each field
fields: <% config[:fields].each_with_index do |field, index| %>
- <%= field.name -%>: # The lowercase, underscored name of the field
locomotive/wagon/decorators/content_type_decorator.rb b/lib/locomotive/wagon/decorators/content_type_decorator.rb +3 -3
@@ @@ -14,7 +14,7 @@ module Locomotive
%i(name slug description label_field_name fields
order_by order_direction group_by
public_submission_enabled public_submission_accounts
- raw_item_template display_settings)
+ entry_template display_settings)
end
def fields
@@ @@ -52,8 +52,8 @@ module Locomotive
self[:public_submission_accounts]
end
- def raw_item_template
- self[:raw_item_template]
+ def entry_template
+ self[:entry_template]
end
def display_settings