.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. ================================================== .. DEFINE SOME TEXTROLES .. -------------------------------------------------- .. role:: underline .. role:: typoscript(code) .. role:: ts(typoscript) :class: typoscript .. role:: php(code) Your own variables ^^^^^^^^^^^^^^^^^^ Youcan declare own variables in TypoScript for your own template. This variables are here valid: page, questions, answers and the highscore/poll result list. This is important for even/odd interpretations. You can use “plugin.tx\_myquizpoll\_pi1.myVars.page.” in TEMPLATE\_QUESTION\_PAGE and TEMPLATE\_RESULT\_PAGE, “plugin.tx\_myquizpoll\_pi1.myVars.questions.” for questions, “plugin.tx\_myquizpoll\_pi1.myVars.answers.” for answers and “plugin.tx\_myquizpoll\_pi1.myVars.list.” for the highscore and the poll result list. This variables can be used in your template at this way: ###MY\_YOURVARIABLE###. Replace YOURVARIABLE with the name of your variable. Recommendation: take a look at the “template\_analysis.html”. *:underline:`Note`* : MY\_SELECT (select-box), MY\_OPTION (select- option), MY\_INPUT\_TEXT (text-answer), MY\_INPUT\_AREA (text-area), MY\_INPUT\_RADIO (radio-button), MY\_INPUT\_CHECKBOX (checkbox), MY\_INPUT\_WRAP (wrap the text of input-fields), MY\_INPUT\_ID and MY\_INPUT\_LABEL are reserved for questions and/or answers and can be set via TypoScript.Radio-buttons and check-boxes have no class- attribute. This is the only way to give them a class-attribute!Yes-no- boxes are automatically wrapped by the the classes tx\_myquizpoll\_pi1-yesno, -yes and -no. Example 1: TypoScript: myVars.questions.eo\_align = tx\_myquizpoll\_pi1-right,tx\_myquizpoll\_pi1-left HTML-Template, area ###TEMPLATE\_QUESTION###:
This means: ###MY\_ALIGN### will be replaced by “left” for the 1st and 5th answer of a question, “center” for the 2nd and 4 :sup:`th` answer and “right” for the 3th answer of every question. Example 3: TypoScript: myVars.list.even\_odd = -odd,-even Template ###TEMPLATE\_HIGHSCORE\_ENTRY###: