[TYPO3-dev] Re: default selected category when using makeCategorizable()

Gernot Schulmeister gernotschulmeister at gmx.at
Tue Jun 17 22:41:28 CEST 2014


Another possibility could be to use the getMainFields_preProcess Hook to preselect the category like:

public function getMainFields_preProcess($table, &$row, &$reference) {

        if ($table == 'tx_artikel_domain_model_artikel' && !intval($row['uid])) {
             $row['category']  = 1;
        }
}

with best regards



More information about the TYPO3-dev mailing list