+
+ def render_content(%{"type" => "Video"} = object) do
+ name = object["name"]
+
+ content =
+ if !!name and name != "" do
+ "<p><a href=\"#{object["id"]}\">#{name}</a></p>#{object["content"]}"
+ else
+ object["content"] || ""
+ end
+
+ content
+ end
+
+ def render_content(%{"type" => object_type} = object) when object_type in ["Article", "Page"] do
+ summary = object["name"]
+
+ content =
+ if !!summary and summary != "" and is_bitstring(object["url"]) do
+ "<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
+ else
+ object["content"] || ""
+ end
+
+ content
+ end
+
+ def render_content(object), do: object["content"] || ""