
Snippet LxQuiz
Call uncached! Renders the quiz form. If the user is not logged in, shows an appropriate message.
Example calls
Show a specific quiz
fenom
{'!LxQuiz' | snippet: [
'quizId' => 1,
'nextStepName' => 'Home page',
'nextStepUrl' => $_modx->config.site_url,
'closeUrl' => $_modx->config.site_url
]}Show quiz from URL hash parameter
fenom
{'!LxQuiz' | snippet: [
'nextStepName' => 'Home page',
'nextStepUrl' => $_modx->config.site_url,
'closeUrl' => $_modx->config.site_url
]}Parameters
quizId optional
ID of the quiz to show. If omitted, the snippet gets the ID from a hash in the URL (generated by LxQuizList when listing quizzes).
tpl optional
- Default:
lxQuizAppContainerTpl
Chunk for the Vue app container.
errorTpl optional
- Default:
lxQuizErrorTpl
Chunk for errors (receives $message).
nextStepName optional
Label for the next step after passing the quiz
nextStepUrl optional
URL to go to after passing the quiz
closeUrl optional
URL for the "Finish" button
