[TYPO3-project-formidable] rdt lister: Use HTML-Code instead of asc/desc image via CSS class

Hauke Hain newgrp at googlemail.com
Sun May 3 09:24:44 CEST 2009


Hi there,

I do not like the picture for ascending or descending lists delivered with
because it is unnecessary.
Intstead I use Unicode Geometric Shapes, so you put only a HTML-Code instead
of an image.
It is handy for most users.

To have this included do the following in the
\api\base\rdt_lister\api\class.tx_rdtlister.php:

add after line 775:
$sortSymbol = "";


add after line 783:
$sortSymbol = "▼";


add after line 790:
$sortSymbol = "▲";


replace line 805 (
$sTag = "<a href=\"" . $sLink . "\" title=\"" . $sAccesTitle . "\" class=\""
. $sColumn . "_sort " . $sCssClass . "\">" . $sSortHtml . $sLabelDir .
"</a>";
)

with:
$sTag = "<a href=\"" . $sLink . "\" title=\"" . $sAccesTitle . "\" class=\""
. $sColumn . "_sort " . $sCssClass . "\">" . $sSortHtml . $sLabelDir .
$sortSymbol . "</a>";



I think this should be implemented in formidable.
But because this would change the design I recommend a new configuration:

So add before line 805:
if(($this->_navConf("/template/useunicodegeometricshapes")) == FALSE)
$sortSymbol = "";


Now, if you want to use the Unicode Geometric Shapes instead of the image
just set your lister-xml:

<renderlet:LISTER name="testlister" cachehash="true">
   <template useUnicodeGeometricShapes="True"/>
   <columns>
    <column name="test" type="renderlet:TEXT" listHeader="This is a test" />
   </columns>

  </renderlet:LISTER>


I added the file if you want to include it fast. It is based on the lates
SVN version.


Happy coding!
Hauke



More information about the TYPO3-project-formidable mailing list