How to make TSConfig work in TYPO3 tx_news - typo3

In TYPO3 6.1, how do I get the tsconfig for the tx_news news extension to work?
I try to add selectable layouts to news items:
tx_news.templateLayouts {
1 = A custom layout
99 = LLL:fileadmin/somelocallang/locallang.xml:someTranslation
}
This should add the new Layout to the Type field, as in:
or did I get that wrong? Where can that new custom layout be selected?
Also, I'm trying to prefill fields in flexforms (when a new plugin is inserted):
TCEFORM.tt_content.pi_flexform.tx_news.sDEF.categoryConjunction = and
But it does not work yet.
How can this be done?

With tx_news.templateLayouts you override the flexform for the news plugin you insert on a page, not for a news record.
Your second code looks almost right, but you forgot settings: TCEFORM.tt_content.pi_flexform.tx_news.sDEF.settings.categoryConjunction = and
And even though this code is right, it will not work because of a bug with flexform fields that have a dot in their name (this is just stupid).
I think the only way to cleanly modify the flexform, is to write a small extension which overrides the default news flexform.

Related

Show other field than title for some page types in TYPO3 backend page tree

We have an extension in TYPO3 8.7, which we're updating to TYPO3 10.4. One thing the extension does is alter the page tree in the backend so for some page types a different field than title is shown. For TYPO3 8 we're using a hook for that: $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] where we could loop through the page tree nodes, check the doktype and replace the text.
The page tree has been completely rewritten in TYPO3 9, so this hook doesn't exist anymore. I've looked in the new TYPO3\CMS\Backend\Controller\Page\TreeController class, but don't see any Signal Slot or PSR-14 event in that class we can use.
Is there a way to manipulate the page tree in this way in TYPO3 10?
If you use the Navigation Title field (nav_title) provided by TYPO3 out of the box, you can use the Page TSConfig option showNavTitle to prefer that in the page tree if set for a page:
pageTree {
showNavTitle = 1
}
If nav_title is empty, the regular title is shown instead.

TYPO3 7.6 TCEFORM Custom Layouts doesn't work

I upgraded TYPO3 6 to 7.6.x and now I can't choose custom layouts in the backend for any content elements in the backend. I only see the default options like "layout 1, layout 2". The reason is obviously that my TCEFORM addings doesn't work..
The following typoscript won't have any effect in a ext-template of a page or in the root setup.ts:
TCEFORM.tt_content.layout.altLabels.2 = Test
TCEFORM.tt_content.layout.removeItems = 2,3
TCEFORM.tt_content.layout.addItems.5 = New Item
I know the problem description is a bit inaccurate. But I don't see the relevant infos which u need. Can u give me an advice what I have to check? Are there known conflicts with extension like fluidcontent, css_styled_content or so?
TypoScript configuring the back end is (though TypoScript by syntax) often called TSConfig and can be added either in page records or via user settings but never in extension templates or similar.
Configuring TCEFORM is usually done in page properties. To add, open page properties of your root page (or the topmost page of the subtree you want to configure) and add your code there.
As in front-end TypoScript you can swap your code to external files.
You need to add this typoscript on Root Page in Page TSconfig.
Edit root page properties and add your typoscript in Resources tab in Page TSConfig section like below image, so it's work fine.

TYPO3 news hidePagination

I use this TYPO3 news extension.
I want to disable paging though typoscript. The option for it is plugin.tx_news.settings.hidePagination so I tried this
plugin.tx_news {
settings.hidePagination = 1
}
But this doesn't work. However setting plugin.tx_news.settings.list.paginate.itemsPerPage to a very large value does work. But that isn't a very nice solution.
Have I missed something on how to set hidePagination?
Theres a checkbox in the tx_news plugin.
Additional -> Hide the pagination
It seems to overwrite the TS (unchecked by default).
Does
plugin.tx_news {
settings.hidePagination = 1
}
get called in your template?
You can always check this with
<f:debug><{settings}</f:debug> to see what get's parsed.
The option to hide the pagination only hides the pagination in the frontend and does not show all news entries at one page. You can only set a high number to the list View to show all entries at one page. I think, there is no other solution at this time.
To override the values set in the news plugin flexform, you have to add the field to plugin.txnews.settings.overrideFlexformSettingsIfEmpty.
To add the field in question to the news extension standard list add this to your TS:
plugin.txnews.settings.overrideFlexformSettingsIfEmpty := addToList(hidePagination)

how to completely remove more link in typo3 news subhead

Does anyone know how I can completely remove the [more] link that appears next to the subheader in tt_news items in typo3? I've tried the following, but neither removes the anchor tag that is generated:
_LOCAL_LANG.default.more =
_LOCAL_LANG.default.more >
Any help would be appreciated.
In tt_news v3 list view, use
plugin.tt_news.displayList.subheader_stdWrap.append >
With _LOCAL_LANG you can only override or clear language labels. The tags are generated in the code or templates.

TYPO3 with TemplaVoila missing Backend Content View

After setting up TemplaVoila like ever i end up in this view.
I set up TV with the wizard. all example pages and content elements were there (i deleted them after)
but they werent visible in Page view. also there are no "new contentelement" icons and all that stuff.
Heres the typoscript:
page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
No errors, installed everything like 20 times before. Just another TYPO3 Version 4.6.3 - but theres nothing to if there are some conflicts with TV and TYPO3 4.6.3
Check your TemplaVoila mapping. This usually happens when you don't have an entity for content elements mapped.