Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
left23 opened this issue Aug 18, 2017 · 1 comment
Open

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

left23 opened this issue Aug 18, 2017 · 1 comment

Comments

@left23
Copy link
Member

left23 commented Aug 18, 2017

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
Copy link
Member

e0ipso commented Aug 18, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants