[TYPO3-mvc] How to display images of a specific category with a fluid template ?
Florian Rival
contact at oktopuce.fr
Wed Apr 2 10:43:03 CEST 2014
Hi,
I'm working with Typo3 V6.2 and I'd like to select images belonging to a
specific category.
In my template, I tried this :
<v:resource.image categories="2" as="resources">
{resources -> f:debug()}
</v:resource.image>
But nothing is displayed, so, I looked in the code to see how it should
work and I saw that the selection by category is in the file
"AbstractResourceViewHelper.php" looking in the table
'sys_category_record_mm' :
if (FALSE === empty($categories)) {
$sqlCategories = implode(',',
$GLOBALS['TYPO3_DB']->fullQuoteArray($categories,
'sys_category_record_mm'));
$res =
$GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_foreign',
'sys_category_record_mm', 'tablenames = \'sys_file\' AND uid_local IN ('
. $sqlCategories . ')');
}
but, in my case, the column 'tablenames' is 'sys_file_metadata' and not
''sys_file' so, I tried to change the table name and everything works fine :
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_foreign',
'sys_category_record_mm', 'tablenames = \'sys_file_metadata\' AND
uid_local IN (' . $sqlCategories . ')');
So I would like to know if someone knows another way to select images by
category.
Thanks,
Florian
--
Re: [TYPO3-dev] How to call Extbase controller action from piBase-Plugin?
==================================================
Florian Rival
Oktopuce
tel.: +33-642-255-448
fax : +33-985-375-102
web: www.oktopuce.fr
==================================================
More information about the TYPO3-project-typo3v4mvc
mailing list