.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. ==================================================
.. DEFINE SOME TEXTROLES
.. --------------------------------------------------
.. role:: underline
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)
Setting user data and markers references
----------------------------------------
In order to make a generic template, user data and markers can be
introduced. In the previous example, let us assume that we want to
make the color inside the polar curve and the data configurable for
content objects.
This task is performed in some manner by overloading specific
attributes in the template with a reference. The syntax is similar to
the “ref” attribute. Use ref\_abcd=“tagName#id” to overload the
attribute “abcd” with the “tagName” element with the given “id”.
Marker reference for the color
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For example, to overload the color inside the polar plot with the
“marker” whose id is “color”, a slight modification of the concerned
line is necessary:
::
Add also a tag at after the tag.
::
Now, in the plugin configuration, the overloaded attributes section is
automatically filled with the marker and its comments. Double-click on
the tag name, that is “color” and fill the markers section as shown
below.
.. figure:: ../../Images/TutorialPolarPlotWithMarkersFlexform.png
Reload you page in FE and you should obtain a new display with the
color inside the polar plot in “lightred”.
.. figure:: ../../Images/TutorialPolarPlotWithMarkers.png
Data reference for user data
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You may also want to change the data using the “Data” section, once
again a small modification of the concerned line is necessary:
::
As it can be seen, we overload the “ref” attribute with data provided
in the section whose id is “userData”.
Using the provided template, the overloaded attributes section is
automatically filled with the data and its comments. Double-click on
the tag name and fill the data section as shown below.
.. figure:: ../../Images/TutorialPolarPlotWithDataFlexform.png
Reload your page in FE and you should obtain the following figure.
.. figure:: ../../Images/TutorialPolarPlotWithData.png
The final template
^^^^^^^^^^^^^^^^^^
::
0,1,10,2,30,25,40,60,
50,110,60,160,70,210,75,230,80,260,
85,270,90,280,
95,270,100,260,105,230,
110,210,120,160,130,110,140,60,
150,25,170,2,180,1
How to copy the image in a given file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sometimes it is useful to have a copy of the image in a given file. It
can easily be done with specific tags in the tag as shown
below:
::
In the code in bold, a directory is defined to have the constant
PATH\_site interpreted. As explain previously, the file used to store
the image is by default in the reference “file#1”. It is copied into
the destination file. Go to “fileadmin” and verify that you have got
the file “test.png”.