ecm_cms2 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ecm/cms/resolvers/ecm/cms/page_resolver.rb +23 -4
- data/lib/ecm/cms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7cf417eadabcf58c8bef9250e8c60ed099a1db6
|
4
|
+
data.tar.gz: cef10bd01e97e372f0d8c9570df0285c0ad55389
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 033f610671de719fe8fada46fef812872b76bfa555faddab1a5226c79b3f5dcec5bfd45daafda616abff782427df381f360b7eca18f783653edbd3243cb823cb
|
7
|
+
data.tar.gz: 4e78889dfcaffd305091ef334651809e0ec5d1b506037b2b1c6a4710e7d4465636ce16e0d6715d0bab64fed4e273a6d7d103184fa1bd2718530759ef579af2fd
|
@@ -16,10 +16,9 @@ module Ecm
|
|
16
16
|
rendered_body = RedCloth.new(content_block.body).to_html
|
17
17
|
output << "<% content_for :#{content_block.content_box_name} do %>#{rendered_body}<% end %>"
|
18
18
|
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
output << content_for_title << content_for_meta_description
|
19
|
+
|
20
|
+
output << content_for_title(record)
|
21
|
+
output << content_for_meta_description(record)
|
23
22
|
|
24
23
|
output << record.body unless record.body.nil?
|
25
24
|
|
@@ -37,6 +36,26 @@ module Ecm
|
|
37
36
|
def template_class
|
38
37
|
'Ecm::Cms::Page'
|
39
38
|
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def content_for_title(record)
|
43
|
+
case record.handler
|
44
|
+
when 'haml'
|
45
|
+
"= content_for(:title) { \"#{record.title}\" }\r\n"
|
46
|
+
else
|
47
|
+
"<% content_for :title do %>#{record.title}<% end %>"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def content_for_meta_description(record)
|
52
|
+
case record.handler
|
53
|
+
when 'haml'
|
54
|
+
"= content_for(:meta_description) { \"#{record.meta_description}\" }\r\n"
|
55
|
+
else
|
56
|
+
"<% content_for :meta_description do %>#{record.meta_description}<% end %>"
|
57
|
+
end
|
58
|
+
end
|
40
59
|
end
|
41
60
|
end
|
42
61
|
end
|
data/lib/ecm/cms/version.rb
CHANGED