contentacms / contenta_ember

Demo app using Ember JS.
GNU General Public License v2.0
8 stars 8 forks source link

Promoted Items - how it should work, and what is there now #4

Open left23 opened 7 years ago

left23 commented 7 years ago

See https://www.drupal.org/files/issues/1%20-%20Umami%20Front%20wirefame%20v4.png and http://umami.emc23.com

Note the first element: the Promoted Items. The first item has "Our recipe pick", and then "type" on the second and third item.

Note: In order to see this properly, you can use http://contenta.eclecticmeme.com source. Only a few items are promoted here, whereas http://live-contentacms.pantheonsite.io has most items promoted.

What we have now:

Currently we have only Recipe and Article (with only one piece of content) content types. Let's assume article is the same as feature, for now.

This element is the index.hbs, meaning it is in the content outlet area of the app. See application.hbs line 9 - 16 (brings in index.hbs for frontpage only) and 24 - 31 (all other pages)

For the items loops, I use .firstObject and assign it a different component (just for the template file, because it's only markup) so I can achieve a different layout (title above image).

FilterByPromoted action is currently limited to recipes content type. I have duplicate code in controllers/index.js and application.js because I don't know what is best.

This is how I think that area should work:

  1. Need to access articles, recipes, and maybe other (or all) content types. Depends whether the criteria is type-specific, or only that a node has the promoted flag.
  2. Add isPromoted = true to the action query? Currently it seems to not show promoted, except in the first item's case, or there may be another filter conflicting
  3. Nice to have - This should be a feature that can be added anywhere i.e. not part of the index.hbs
  4. Nice to have - I would like to be able to add the .firstObject conditional to the promoted-listing component, not index.hbs
e0ipso commented 7 years ago

This is awesome stuff. Can we move it to https://github.com/contentacms/contenta_consumers/issues so other consumers can add to the conversation?