Overview
The "Quiz" scene uses an Asset Flow collection to display a set of questions about popular culture. All information about these items - the questions, the possible answers, the answer, an image of the answer - is not stored in this experience. Instead, they are stored in a Headless CMS base, which lives in the cloud. To add or change questions and answers, you need to open and edit the base.
Why use Headless CMS? This way, item updates can be made without ever touching the experience in Composer. In fact, the people responsible for adding/removing/changing items in the quiz don't need to know you used Intuiface at all!
Replace one of the questions and answers with your own
Open the Headless CMS base used by your copy of "My First Project"
- To the left of Composer, in the "Interface Assets" panel, right-click the entry "My First Project_duplicate" and select "Open base in H-CMS editor" in the pop-up menu.
- The Headless CMS dashboard will open in your PC's default web browser. You will have to log into your Intuiface account if you haven't logged in already.
Replace a question and answers with your own
- Select the "Content" tab at the top of the base editor.
- Select the "Questions" collection on the left side of the editor.
- On the right side of the editor, you will now see a list of all existing questions and answers in the catalog. Note how each item is comprised of eight editable fields:
Question | Image | Answer A | Answer B | Answer C | Answer D | Correct Answer
(Headless CMS automatically creates values for the "Item ID" field.)
Depending on your preference, click the "Switch Orientation" button to turn the horizontal list of questions into a vertical list. - Hover your mouse over the "Item ID" field for the first question. A two-sided arrow will appear. Click that arrow.
- Fill out the form using your own questions, answers, and image. Hovering your mouse over the info symbol () for each field will show you advice and constraints about what can be entered. For example, the image can't be more than 5MB in size. (These constraints were set by the base creator. They can be changed.)
- New items always default to Draft status, meaning they won't be visible to the experience but will be editable in the base. However, let's not wait to make it visible to the experience.
Click the "Draft" field and select the "Publish now" option.
You're published! Click anywhere on the screen to close the New Item editor. - Back in the Questions table, you should see your new question at the beginning of the list.
View your question and answers in the running experience
- Back in Composer, start Play Mode.
- Select the "Quiz" scene and start the quiz. Do you see your new question? Nice job!
Whenever you run an experience using one or more Headless CMS bases, local copies of those bases will ask the cloud-hosted master version of each base if there are changes. These changes are downloaded, which is why you saw your addition right away. You can also set your local base copy to check for updates at specified intervals.
Comments
0 comments
Please sign in to leave a comment.