[TYPO3-mvc] fluid <f:if > with a regular expression

Christian Schwan - Dimme GmbH christian.schwan at dimme.ch
Sat Jun 12 11:12:46 CEST 2010


Ok then try the render them in you controller first with foreach image

/**
* The session data container
* @var array
*/
protected $img = array();  

foreach ($this->imageRepository->findAll() as $image) {

$this->img[]['name'] =  $image ->getName();
$this->img[]['file'] =  $image ->getFile(); //// Here you can do your pre_match
}

$this->view->assign('image', $this->img);



-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Fernando Arconada
Gesendet: Samstag, 12. Juni 2010 11:02
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] fluid <f:if > with a regular expression

Sorry, but i want to render the image which name is "Thumbnail" or "Car" 
or "any string". I don't want to render all images in my list 


El Sat, 12 Jun 2010 10:51:34 +0200, Christian Schwan - Dimme GmbH
escribió:

> He fernando,
> 
> you should use the image viewHelper inset...
> 
> http://forge.typo3.org/attachments/1003/ImageViewHelper.php
> 
> {namespace product=Tx_Productpresenter_ViewHelpers}
> 
> <product:image src="uploads/pics/{image.file}" maxW="100"/>
>     
>     
> So you can render thumbs and big Images.
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
> Fernando Arconada
> Gesendet: Freitag, 11. Juni 2010 21:55 An:
> typo3-project-typo3v4mvc at lists.typo3.org Betreff: [TYPO3-mvc] fluid
> <f:if > with a regular expression
> 
> Hello
> 
> I'm trying something like
> <f:if condition="preg_match('/Thumbnail/',{image.name})"> <f:then>
> 	{image.file}
> </f:then>
> </f:if>
> 
> but it always return true
> 
> any idea?
> 
> 
> Kind regards
> 
> Fernando Arconada
> _______________________________________________ TYPO3-project-typo3v4mvc
> mailing list TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> Eingehende eMail ist virenfrei.
> Von AVG Free SB überprüft - www.avg.de Version: 9.0.829 /
> Virendatenbank: 271.1.1/2930 - Ausgabedatum: 06/11/10 08:35:00
> 
> Ausgehende eMail ist virenfrei.
> Von AVG Free SB überprüft - www.avg.de Version: 9.0.829 /
> Virendatenbank: 271.1.1/2930 - Ausgabedatum: 06/11/10 20:35:00

_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
Eingehende eMail ist virenfrei.
Von AVG Free SB überprüft - www.avg.de 
Version: 9.0.829 / Virendatenbank: 271.1.1/2930 - Ausgabedatum: 06/11/10 20:35:00 

Ausgehende eMail ist virenfrei.
Von AVG Free SB überprüft - www.avg.de 
Version: 9.0.829 / Virendatenbank: 271.1.1/2930 - Ausgabedatum: 06/11/10 20:35:00 



More information about the TYPO3-project-typo3v4mvc mailing list