namlook / ember-eureka

Ember client for Eureka applications
MIT License
3 stars 0 forks source link

Replace __title__ by templates and __reprField__ #26

Closed namlook closed 10 years ago

namlook commented 10 years ago

The title template are found in <generic_model>.__title__.hbs

the title and description are defined in template via their helpers:

<h1>{{title model}}</h1>
<p>{{description model}}</p>
namlook commented 10 years ago

Other suggestion:

{
  BlogPost: {
    representation: {
      titleField: 'title',
      descriptionField: 'description',
      thumbField: 'thumb',
      geolocationField: 'geolocation',
      langField: 'lang'
    }
    schema: {...}
  }
}

In representation, the field does not necessary be present in schema. It could be a computed field on the model (for instance geolocation computed from geoLat and geoLong)

namlook commented 10 years ago

Fallback to title and description. If not present in the content, we can add/overwrite in the model

namlook commented 10 years ago