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

Components & Dynamic Data #28

Open
sonofabear opened this issue Oct 16, 2015 · 2 comments
Open

Components & Dynamic Data #28

sonofabear opened this issue Oct 16, 2015 · 2 comments

Comments

@sonofabear
Copy link

As a site admin, I would like the ability to create pages that contain components that will draw content from data models in the system.

Example Problem
ASME has 9 winners off the bat, with more on the way in the future. Currently we have a winners list page that displays all the winners with some details, with a link to view more information for each. On the further detail page, we have 4 subpages of information on each. Currently the admin needs to go in and create pages for each winner and there is some duplication across pages, it’s a lot of wasted work to add each one and if there are any content changes, they will need to be made in multiple places.

Proposed Solution
Allow for creating “Template” pages that, when adding components, allows the creator to match up what is displayed in a field to different fields of the selected model. Then on the front end, a user could navigate to (ex) thisishardware.org/winner/xxx and the fields would map based on that winner’s data.

artboard 1

Thoughts on matching up the fields would be either to build into each component which fields matched to which fields in the model, or to let the person building the page choose from a list of available fields to match up with.

So when adding components to a template page, we could give the user the choice to use dynamic data, or manually enter data like normal. On any regular page the use would enter data as they currently do using the CMS.

@gabeweaver
Copy link

initial thoughts about this:

  • If we are using JSON, assume there are interface objects as well as data objects that are persisted in a database that can be created/updated/deleted.
  • I would assume we could use something like Handlebars to put dynamic content into component templates.

@sonofabear
Copy link
Author

Yea, I'll leave it up to the engineering experts on the best way to get data into the components, just wanted to get the idea out there and make sure that it was still flexible for the end user.

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

No branches or pull requests

2 participants