tx_news parent category required - typo3

The following scenario: TYPO3 7.6, news articles (tx_news) with two-tier categories. Selection category is mandatory, but editors have often only selected subcategory. 1., is there a possibility that category level 1 must also be selected? 2., someone has a tip, as I can automate also the parent category can activate afterwards?

I am not sure if it is a good idea that both categories must be checked but it highly depends on your needs. If it is because of potential requests or output in the frontend, it is enough that the child category is checked.
As a solution I would change the rendering of the categories and use a select list instead of the tree and render the parent categories with the value --div--. If the minitems setting is set to 1 as well, the user will be required to select a subcategory as parent categories are then not selectable.

Related

ACF - category field data to its containing posts/pages

I am trying to find a general way to bring the field data of a category to the posts in this category.
My categories have fields like "e-mail", "adress" etc. and I can show this data on the category pages. It would make sense that the posts/pages assigned to a category somehow inherit the field data of their parent category.
Is there a way to achieve this through functions.php or some setting?
Some help would be greatly appreciated. Thanks!
Cheers, Markus
I am pretty sure you would have to do a separate query in the post/page template to get the acf field data associated with the category of the posts/pages.
You could make this into a function. You would send the categories from the template page for your posts or pages to this function and get the template to assemble the acf metadata.

Display only local categories or tree view in TYPO3 news creation

I have a TYPO3 v7.6.18 multi-site system with tt_news plugin for news.
Each site has its own news section with different categories like:
I would like to be able to choose from these categories, when creating a news item, but in the Categories&Relations (I have hidden the Relations tab, since I don't use it), I get the whole list of categories from almost all the projects (probably all, there is just a limit on how many it shows):
How can I set it to show only the categories for current page (or least a tree view, where I can see, where the categories belong to), because currently it's impossible to tell, what category belongs to which project (since the names overlap).
You can use TCA overrides to customize the foreign_table_where configuration option of the categories field in the tx_news_domain_model_news table:
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['categories']['config']['foreign_table_where'] = ' AND sys_category.pid = ###CURRENT_PID###' . $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['categories']['config']['foreign_table_where'];
Notice that you need to prepend your additional constraint because the existing constraint ends with a ORDER BY.

Manual sorting of sys_category

On my TYPO3 7 site, i'm not able to choose an order to the categories of a page or a news (plugin tx_news). I can only choose what categories that page or news have, using the checkboxes to select them.
Is there any configuration for that?
Alternatively, I may override these fields with my own TCA, but have no ideas on how to get a sorting tree of categories. Any hint?
On my sites running previous TYPO3 versions with tt_news plugin, its category tree allows to change the sorting after selecting the categories.
I coudn't find anything about it on the "select" documentation (https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html). Looks like MM relations doesn't support sorting.
Does anyone knows how to get it?
Make sure you have the "extended view" checked at the end of the page. You can then sort the sys_category-entries using the up/down arrows.
If you need to sort your categories per item and not globally then a default MM relation will not work as it doesn't support sorting. You're on the right track. Override or extend the TCA, don't specify a MM relation and don't use the tree view rendering. Use a standard select like you would select pages. This should store the values as a comma-list string in the database and so represent the sorting like you would see it the backend.

tt_news marker "NEWS_CATEGORY" gives me parent category and all child category

I have the following news category structure
News
|-Category 1
|-Category 2
|-Category 3
I have made a TYPO3 update recently and now I'm experiencing that the marker NEWS_CATEGORY is printed in the following way
News, Category 1, Category 2, Category 3
The news article itselfs is assigned to the category news. How can I restrict this output to the category it is assigned (in this case News)? I don't know if it was the TYPO3 update (including tt_news update) or a configuration problem in my setup.
If I use NEWS_CATEGORY_ROOTLINE then I get something like News > Category 2. How can I output only the name of the selected category? The problem seems to only occur when the parent category is selected.
When you update tt_news it's strongly suggested to also use the built-in update. Tt_news recently updated also the table structure so you really need to follow the tt-news update instruction. It also makes it not compatible with older tt-news.
displaySubCategories = 0 seems to do the trick.

Is it possible to prioritise the product order in Adobe Business Catalyst?

A client has asked if they can prioritise a certain product in their online catalogue so that it appears as the second product rather than the sixth or so. Is this possible?
This is all I can find in the help section, which points to a no answer.
Customizing how sub-catalogs list appears
{tag_cataloguelist,rowLength,targetFrame,notUsed,sortType,hideEmptyMessage,list/table}
rowLength Number of catalogs per
row targetFrame e.g. _blank.
Specify the frame you want the product
to open in resultsPerPage
Number of catalogs you wish to display
before the page paginates
notUsed this field is not currently
used. Leave empty. sortType
- Alphabetical
- Weight (Defaut) hideEmptyMessage if a catalog does not
have any sub-catalogs you will see a
message This catalog has no
sub-catalogs. You can hide it by
setting it to true.
Hopefully I'm just missing a really obvious control in the BC interface somewhere.
So that help documentation you've pulled up is regarding catalogs. If you want the catalogs to appear in a different order, use the "Weight" sortType in your tag_cataloguelist and assign weights to your catalogs when setting them up.
For individual products in the list view, assign a weight to each product under eCommerce > Products in the detailed product settings. You can also assign weights in bulk by downloading the entire product list then reimporting the product database.