[TYPO3-formidable] Show header on LISTER

Luc Muller luc-mailingtypo3 at ameos.com
Wed Dec 21 11:41:13 CET 2011


Hi as I've seen you didn't get any answers from now.

I don't know if this is a "good" idea to be integrated into the core of 
formidable

2 reasons :

1) Html table do not provide any header in it' available tags
2) You could use a renderlet:BOX or TEXT to provide any kind of headers 
you want.

Exemple :

<renderlet:BOX name="mybrand" mode="h2">
	<html>
		<userobj>
			<php><![CDATA[
				$ttBrand = t3lib_div::_GET('tx_brand');
				$brand_uid = $ttBrand['uid'];
				$brand_name  = tx_myhelper_div::getBrandName($brand_uid);
				return "$brand_name"; <= See No Html Tags Here
			]]></php>
		</userobj>
	</html>
</renderlet:BOX>

By the way we can implement other stuff according to the table, such as 
the <caption> tag to hold the caption of the table.
This would make sense because it's highly related to the table itself.

Cheers,

Luc =:0)

Le 17/10/2011 13:14, dpino a écrit :
> Hi,
>
> I was looking for a way of adding a header to a LISTER. The idea is to
> show a header that could stand for the name of a listing. For instance,
> imagine I have a LISTER for showing car models from a brand of cars. I
> would like to show before the list the name of the brand for that list
> of cars. However, the name of the brand is not fixed, depends on a GET
> parameter.
>
> I didn't find anything in the LISTER API to do this so I added a new
> field to LISTER called <header>. This new field works at the same level
> as <ifempty> or <message>. The header is always shown on top, right
> before the listing rows. It supports either literal strings or php code.
> Here is an example on how to use it.
>
> <header>
> <userobj>
> <php><![CDATA[
> $ttBrand = t3lib_div::_GET('tx_brand');
> $brand_uid = $ttBrand['uid'];
> $brand_name = tx_myhelper_div::getBrandName($brand_uid);
> return "<h2>$brand_name</h2>";
> ]]></php>
> </userobj>
> </header>
>
> Please, find the patch attached. It would be nice if it could be
> integrated in the main trunk at some point as I think this functionality
> is often required (the other way of doing the same thing would be to
> create a FE plugin which reused the formidable template, AFAIK).
>
> Regards,
>
> Diego



More information about the TYPO3-project-formidable mailing list