[TYPO3-dam] categories for pages
Martin Baum
martin_baum at gmx.net
Wed Nov 1 11:26:33 CET 2006
hello
currently I'm working on the same problem - connecting the DAM
categories with pages. You can find my solution below.
I placed this inside my tables.php file It's a part of the tx_dam
$TCA definition, written by Rene Fritz:
/**************************************
*
*
* Adding the category browser to the page - TCEForm
*
*
*/
$tempColumns = Array (
"tx_testdamtree_dam_cats" => Array ( // your mm - table!
"exclude" => 1,
"label" => "LLL:EXT:test_dam_tree/
locallang_db.xml:pages.tx_testdamtree_dam_cats",
"config" => Array (
'type' => 'select',
'form_type' => 'user',
'userFunc' => 'EXT:dam/lib/
class.tx_dam_tcefunc.php:&tx_dam_tceFunc->getSingleField_selectTree',
'treeViewBrowseable' => true,
'treeViewClass' => 'EXT:dam/components/
class.tx_dam_selectionCategory.php:&tx_dam_selectionCategory', //
don't work here: $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dam']
['selectionClasses']['txdamCat']
'foreign_table' => 'tx_dam_cat',
'size' => 4,
'autoSizeMax' => 30,
'minitems' => 0,
'maxitems' => 2, // workaround - should be 1
'default' => '',
'MM' => 'pages_tx_testdamtree_dam_cats_mm' // your mm - table!
)
),
);
t3lib_div::loadTCA("pages");
t3lib_extMgm::addTCAcolumns("pages",$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes("pages","tx_testdamtree_dam_cats;;;;
1-1-1"); // your mm - table!
Now a DAM - Category tree should be rendered in the TCE Form of the
page record. hope this is helpfull.
if you have any suggestions about this, feedback whould be nice
Kind regards
Martin Baum
Ohlauer Straße 41
80997 München
martin_baum at gmx.net
0175 / 454 60 22
Am 01.11.2006 um 10:25 schrieb Héctor Ordóñez Taboada:
> Hi all!
> I started like one month ago with typo3 with the purpose of
> enhancing the
> dam module, so pages for instance, have categories as well. What I
> have done
> till now is to create a table like the one tx_dam_mm_cat, and add a
> field to
> the table pages, name "category" like the one existing in
> tx_dam_cat. i knew
> that it would be rendered by itself in the pages editing form, but
> not as i
> expected, since i want it to have the same appearance than it has when
> editing the files. I have found out that it depends of the TCA
> definitions
> for the field (plese, correct me if I am wrong!!) so I am looking
> for the
> TCA definitions for the pages table but I haven't found it yet. Any
> indication about where I should look for it?Of course I'm with arms
> wide
> open for advices!!!
>
> Thanks a lot for your help and attention.
>
> kind regards,
>
>
> <b> Héctor.</b>
>
> _________________________________________________________________
> Moda para esta temporada. Ponte al día de todas las tendencias.
> http://www.msn.es/Mujer/moda/default.asp
>
> _______________________________________________
> TYPO3-project-dam mailing list
> TYPO3-project-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-dam
>
Martin Baum
Ohlauer Straße 41
80997 München
martin_baum at gmx.net
0175 / 454 60 22
More information about the TYPO3-project-dam
mailing list