Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:functions:looptopage [31.05.2016 09:27] – [loopToPage()] info_familienwissenschaftenen:create:functions:looptopage [31.05.2016 09:29] – [1st example] info_familienwissenschaften
Line 17: Line 17:
 ===== 1st example ===== ===== 1st example =====
  
-You want to repeat page 5 to 8 of the survey 3 times. The page should show different questions each time.  +You want to repeat page 5 to 8 of the survey 3 times with different questions each time.  
  
   * change the ID of page 8 to "loopend" (you can choose the ID as you wish)   * change the ID of page 8 to "loopend" (you can choose the ID as you wish)
Line 26: Line 26:
 </code> </code>
  
-Now you want to have question ''A001'' to ''A005'' on the first pass. On the second pass you want question ''A101'' to ''A105'' to show on the page. And on the third pass question ''A201'' to ''A205'' +Now you want to have question ''A001'' to ''A005'' on the first round. On the second round you want question ''A101'' to ''A105'' to show up on the page. And on the third round question ''A201'' to ''A205'' 
  
- (the questions were made as section ''A0'' and the section has been copied two times by downloading it as a file and importing it again).+ (the questions were created in section ''A0'' and the section has been copied twice by downloading it as a file and importing it again).
  
 On page 5 you place the PHP-Code shown in the picture. It produces an array which contains a list of the questions and makes them available for the following pages via ''registerVariable()''  On page 5 you place the PHP-Code shown in the picture. It produces an array which contains a list of the questions and makes them available for the following pages via ''registerVariable()'' 
Line 52: Line 52:
 </code> </code>
  
-To show the next questions on page 6 you have to place the following PHP-code on the page. The command ''loopPage()'' shows in which pass the page is revealed. The remaining code is equivalent to the code shown above. +To show the next questions on page 6 you have to place the following PHP-code on the page. The command ''loopPage()'' shows in which round the page is revealed. The remaining code is equivalent to the code shown above. 
  
  
en/create/functions/looptopage.txt · Last modified: 29.12.2018 16:53 by wimmer.andreas
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki