Class: Contentful::Bootstrap::Templates::Blog
- Defined in:
- lib/contentful/bootstrap/templates/blog.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Contentful::Bootstrap::Templates::Base
Instance Method Details
#content_types ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/contentful/bootstrap/templates/blog.rb', line 8 def content_types [ { "id" => 'author', "name" => 'Author', "display_field" => 'name', "fields" => [ { "id" => 'name', "name" => "Author Name", "type" => "Symbol" } ] }, { "id" => 'post', "name" => 'Post', "display_field" => 'title', "fields" => [ { "id" => 'title', "name" => "Post Title", "type" => "Symbol" }, { "id" => 'content', "name" => "Content", "type" => "Text" }, { "id" => 'author', "name" => "Author", "type" => "Link", "link_type" => "Entry" } ] } ] end |
#entries ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/contentful/bootstrap/templates/blog.rb', line 48 def entries { 'author' => [ { "id" => "dan_brown", "name" => "Dan Brown" }, { "id" => "pablo_neruda", "name" => "Pablo Neruda" } ], 'post' => [ { "title" => "Inferno", "content" => "Inferno is the last book in Dan Brown's collection...", "author" => Links::Entry.new("dan_brown") }, { "title" => "Alturas de Macchu Picchu", "content" => "Alturas de Macchu Picchu is one of Pablo Neruda's most famous poetry books...", "author" => Links::Entry.new("pablo_neruda") } ] } end |