I'm using the news extension for TYPO3. I have a page named "News" where I want to show ALL complete news records that exist. But the article is cut with a button "Read on" which leads you to the detail page.
What do I need to do that it shows the whole article on the news page of each article that exists?
TYPO3 version: 7.6.14
Set TypoScript constant plugin.tx_news.view.partialRootPath to a path of your choice (preferrably to an extension holding your concrete site‘s configuration and assets), create a subfolder named 'List' in this path and copy file EXT:news/Resources/Private/List/Item.html over to the newly created folder.
Then adopt this file to your needs. Apparently, you‘d have to change stuff around line 52 to use bodytext only and remove the f:format.crop…
It‘s worth understanding how fallback in template root paths works in news and in TYPO3 in general - I suggest you read up a bit about it
Related
If i created a content elements (f.e. text, image, plugins etc.) in a single news, i cannot copy and paste this content element again. Have I missed something or is it not working (yet)?
Thxs for support
Holger*
It is just not supported, only thing you can do is creating copy of such News record in WEB > List module.
It will create copy of the News itself and copies of all content elements in it. Then you can edit these records to have quite other News and/or CEs. Also if you'll make any change to copied CE it will not reflect the original one(s).
I'm configuring a new website with TYPO3 v. 9.5.
I would like to configure TCA settings to make it possible to force editors to fill fields in content elements like media or news.
In former times I was able to put this settings into a file typo3conf/extTables.php.
In my investigations I found, that I have to put configurations into a directory Configuration/TCA/Overrides of an extension.
I tested it with the extension tx_news like this:
I put this code in a file called test.php as a test and example.
This code forces the editor to always enter an archive date.
This works for me, but after an extension update, this code might be lost and I cannot configure the fields of core extensions for example to force an editor to always enter a title of a content element.
My question is, how can I store this configurations update save within the configuration environment?
Thank you in advance,
Ralf
Depending on your modifications you need to consider some aspects:
always use a filename according to the table your modifications belong.
so for the news records it should be: Configuration/TCA/Overrides/tx_news_domain_model_news.php
make sure your modifications are loaded after the first initial configuration: make a dependency to the original extension.
Okay the title may be confusing and thats because im a beginner in typo3.
So i set up a empty typo3 project via composer.
Now i want to write my typoscript "code" in my project files and not directley in the backend.
I added a template to a page and in the setup i started to define some page objects.
My problem is:
How do i tell typo3 to use the code that i write in my files rather then the code that is in the backend.
Also where should i put my typoscrip files.
I have them like this.
Also im a bit confused on why my ext directory is empty (besides what i added)
So i would like to move this code
# Default PAGE object:
page = PAGE
page {
bodyTag = <body>
meta.AUTHOR = My Name
meta.DESCRIPTION = My Website
}
To my Project file, and not do any editing in the backend.
Thank you this is my first time posting :)
I see that you've already created an extension EXT:website to store your TypoScript, Fluid templates, etc. You should proceed as follows:
1) create in your extension a php file:
website/Configuration/TCA/Overrides/sys_template.php
<?php
defined('TYPO3_MODE') || die();
call_user_func(function()
{
/**
* Default Static TypoScript for website
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'website',
'Configuration/TypoScript',
'My Provider extension for pages and content'
);
});
2) create two files:
website/Configuration/constants.typoscript
website/Configuration/setup.typoscript
3) You will be able then to add the these files using the "Include static (from extensions)" area of your TypoScript template.
Of course inside these files you can include other files or even folders, see the documentation here
First of all, your project extension (let it call sitepackage) is missing some files. At least an ExtensionManager configuration file ext_emconf.php in the root of your extension 'typo3conf/ext/website' and for composer based TYPO3 installation also a Composer configuration composer.json. See documentation here https://docs.typo3.org/typo3cms/SitePackageTutorial/ExtensionConfiguration/Index.html#directory-and-file-structure
To get started with your own sitepackagae extension have a look at
https://sitepackagebuilder.com/ which helps to kickstart. It will create folder and files, which you may not need, but gives you an impression, which is best practice for file and folders inside your TYPO3 extension.
In your Installation you need to create a root template at your root page. See documentation here https://docs.typo3.org/typo3cms/TemplatingTutorial/7.6/Tasks/WorkingTypoScript/TypoScriptTemplate/Index.html#create-a-new-typoscript-template
Your sitepackage extension should includes TypoScript files under Configuration/TypoScript/, which you can include manually in root TypoScript template at your root page.
for constants
<INCLUDE_TYPOSCRIPT:source="FILE:EXT:website/Configuration/TypoScript/constants.typoscript">
and setup
<INCLUDE_TYPOSCRIPT:source="FILE:EXT:website/Configuration/TypoScript/setup.typoscript">
There are also other different ways to initial load TypoScript. See for example documentation here: https://docs.typo3.org/typo3cms/SitePackageTutorial/ExtensionConfiguration/Index.html
A description on how to load TypoScript without any root template in backend published here https://docs.typo3.org/typo3cms/Snippets/2017/Index.html#root-typoscript-without-database
I build a TYPO3 Extension. And I use for the TypoScript Folder the Files as .ts. For the IDE PhpStorm is this better I use .ts.
But I see in other Extensions the File as .txt.
What is better?
There was a voting recently at decisions.typo3.org to agree on a file extension for TypoScript files.
This voting relates to how to distinguish between TSconfig (User + Page), TypoScript and defining best practices
to be used completely throughout the TYPO3 Core.
.typoscript was voted for by two thirds of participators. If it‘s really a decision and not a mere poll then that‘s what TYPO3 core will be heading for. Refer to the voting to see further details like how to distinguish between TypoScript and TSConfig.
You should use the file ending .typoscript for newer TYPO3 versions.
This was introduced in TYPO3 8.7, see changelog: Feature: #78161 - Introduce .typoscript file extension
Using .txt was deprecated in 9.3, see Changelog Deprecation: #81686 - Accessing core TypoScript with .txt file extension has been deprecated
As already mentioned, .ts is not such a good idea as it is used for Typescript.
See also the official TypoScript coding guidelines
I use the TypoScript Plug-In from Stefan Galinski in PhpStorm. In preferences I add the following file types:
*.t3c for Constants
*.t3s for Setup
*.ts for TSconfig
So I can load constants and setup files from same folder.
Template Constants
<INCLUDE_TYPOSCRIPT: source="DIR:fileadmin/TypoScript" extensions="t3c">
Template Setup
<INCLUDE_TYPOSCRIPT: source="DIR:fileadmin/TypoScript" extensions="t3s">
Page TSConfig
<INCLUDE_TYPOSCRIPT: source="DIR:fileadmin/TSconfig/Page" extensions="ts">
I am quite new in typo3. I read somewhere
You should never edit the original templates of an extension as those changes will vanish if you upgrade the extension
How to create my own custom template based on bootstrap_package extension? I would like to override some files in parital/layout. It would be great if someone can post like/tutorial.
A folder structure and a simple custom typoscript that implement bootstrap_package for my custom temple would be great help.
The bootstrap package developers already added something for this. It is possible to set different locations, where templates are stored. It also uses a fallback solution, that means if a template is not found, it will fetch the original one from the extension.
Create a directory in the fileadmin directory, for example fileadmin/templates/BootstrapPackage. Inside this directory, create the directories "Templates", "Layouts" and "Partials".
In TYPO3 backend, go to the constant editor of the root page and select everything like the screenshot says:
Set the fields "Layout/Partial/Template Root Path" to your new created directorys (fileadmin/templates/BoostrapPackage/Layouts|Partials|Templates). Save and clear the cache.
Now you can create new templates. If you place an exacly named file like it is named in bootstrap_package/Resources/Private/(Layouts/Partials/Templates)/Page/ , TYPO3 will use the new template instead.