When the Onboarding tour is active, it is always available through Account Settings > Onboarding.
When a user opens the network (new session), he will be redirected to /onboarding.
The session variable Events::ONBOARDING_HIDE will be set to true. So for following page requests in the same session no redirect will happen.
Whenever a user clicks "Continue", "Save and Continue", "Finish" or "Save and Finish" in the Onboarding tour, the page will be marked as completed (see table onboarding_done below). For Profile Field pages this happens only when saving was successful.
In a new session, the first uncompleted step is searched for this user. If there is an uncompleted step, the user will be redirected to this step. Otherwise no redirection happens as the user has already completed the tour.
The memory is connected to the page ID. So changes to a page or to the slug of the URL won't trigger to show users this step again. Only if you add a new page to the Onboarding Tour, the user will be redirected to this step.
This holds the profile field pages.
content is a JSON field with an array of sections.
Eeach section has a title, description and columns.
Columns is an array of Profile Field IDs.
[
{
"title":"Section 1",
"description":"Optional description",
"columns":[[1],[2]]
},
{
"title": "Section 2",
"description":"",
"columns":[[3],[5],[6]]
}
]
This table has an entry for each page a user has seen.
A page is identified by page type (profile_pages or custom_pages) and the page ID (defined by the Custom Pages module or the onboarding_profile_pages table).
Using the SettingsManager, there are 5 module settings:
onboardingTour is a JSON array with tour steps.
Every step has a label, a URL slug, a type (profile_pages or custom_pages) and the page ID (defined by the Custom Pages module or the onboarding_profile_pages table).
[
{
"label": "Welcome",
"slug":"php",
"type":"custom_pages",
"id":"1"
},
{
"label": "Profile",
"slug":"profile",
"type":"profile_pages",
"id":"1"
}
]