We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe it´s just me, but i find it clearer if the categories are in the label of the news.
I wrote something small, via DCA contao/dca/tl_news.php:
contao/dca/tl_news.php:
<?php /* * Display the news categories in the dca label for the news */ use Codefog\NewsCategoriesBundle\Model\NewsCategoryModel; $GLOBALS['TL_DCA']['tl_news']['list']['label']['label_callback'] = function(array $row, string $label, DataContainer $dc) { $newsCategories = NewsCategoryModel::findPublishedByNews($row['id']); if($newsCategories) { $categories = []; foreach($newsCategories->fetchAll() as $category) { $categories[] = $category['title']; } return '<span style="padding-right:3px;color:#E20E18;">['.implode(',', $categories).']</span>'.$label; } return $label; };
Maybe something like this? Don´t know if this would be too much if you add 6 or 7 categories to a news ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Maybe it´s just me, but i find it clearer if the categories are in the label of the news.
I wrote something small, via DCA
contao/dca/tl_news.php:
Maybe something like this? Don´t know if this would be too much if you add 6 or 7 categories to a news ...
The text was updated successfully, but these errors were encountered: