Graphics migration manual to 1.6.0


Illustration display

Since version 1.6.0, a survey, survey pages or questions can contain an illustration.

If you have overloaded the rendering of a survey (survey2html.xsl), in particular the templates XSL "page", "question" and "start-page", you will have to add the illustration display yourself by calling the "picture" template.

For example:

Display illustration of a question

<xsl:call-template name="picture" >
   <xsl:with-param name="picture" select="picture" />
   <xsl:with-param name="alt" select="pictureAlternative" />
   <xsl:with-param name="idObject" select="@id" />
</xsl:call-template>   

The XSL "picture" template is configurable:

  • picture: XML element containing information about the illustration
  • alt: alternative illustration
  • idObject: identifier of the object bearing the illustration (page, question, survey)
  • maxHeight: max height of illustration in pixels (default 150px)
  • maxWidth: max width of illustration in pixels (default 150px)
  • class: Classe CSS du <div> englobant ("picture" par défaut)

 

Saving responses via a cookie

Since version 1.6.0, answers to questions are saved by default in a browser cookie, on the site only (Front).

If you have overloaded the rendering of a survey (survey2html.xsl), the templates "head-scripts", "start-page", "finish-page", "submit-button", and "page" are impacted.
The survey identifier and rendering context must be added to the function call. survey_begin, survey_end, survey_previouspage and survey_nextpage

Look for calls to these JS functions in your own XSL and modify any overloads as follows:

<xsl:with-param name="onclick">try { survey_begin('<xsl:value-of select="$uniqueId"/>', '<xsl:value-of select="survey/@id" />', '<xsl:value-of select="$renderingContext" />'); } catch(e) {} return false;</xsl:with-param>
                        
<xsl:with-param name="onclick">try { survey_end('<xsl:value-of select="$uniqueId"/>', <xsl:value-of select="position()"/>, '<xsl:value-of select="../@id" />', '<xsl:value-of select="$renderingContext" />'); } catch(e) {} return false;</xsl:with-param>
                            
<xsl:with-param name="onclick">try { survey_previouspage('<xsl:value-of select="$uniqueId"/>', <xsl:value-of select="position()"/>, '<xsl:value-of select="../@id" />', '<xsl:value-of select="$renderingContext" />'); } catch(e) {} return false;</xsl:with-param>
                       
<xsl:with-param name="onclick">try { survey_nextpage('<xsl:value-of select="$uniqueId"/>', <xsl:value-of select="position()"/>, <xsl:value-of select="count(../page) + 1"/>, '<xsl:value-of select="../@id" />', '<xsl:value-of select="$renderingContext" />'); } catch(e) {} return false;</xsl:with-param>                                    

 

 

Back to top

Survey