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.
Related
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.
I'm using Typo3 8.7.24 and want to create an extension which creates news. I managed to create news records in the storage folder but i also want to make them translatable like in the attached screenshot. What do I have to do to enable it?
You probably forgot to translate the storage folder. You need to create a record of type "Alternative Page Language" there.
To do so, use the list module and add the record there.
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'm attempting to update the UGC toolbar for a Communities implementation. Based on this: https://helpx.adobe.com/experience-manager/6-3/communities/using/rte.html I can update the toolbar. Ideally we'd like the ckrte.js to site within our code base. I've tried within our clientlibs in our project folder but that didn't work.
Can this file live local, or will it only work in CRXDE?
You can copy the file and add it to your code base and ensure that it loads after the out of the box clientlib has loaded. They register the rte as "ckeditor" in the JS, your code will override the previous registration. Saves the hassle of modifying the original file that might get changed during upgrades or service pack installations.
I am creating a page using Liferay6.2 where i need to have left side menus respective to my page. For that i need something similar to dockbar present in Liferay 6.2. Is it possible to create something like that ? And is it possible to place them so that it is visible irrespective of the page we are in. Please help me with some solution.
The best thing to do is create a hook and modify the portlet this way. In your liferay-hook.xml use the following:
<hook>
<custom-jsp-dir>/WEB-INF/jsp</custom-jsp-dir>
</hook>
Then download the Liferay source code for reference and put the original JSP you want to modify into the /WEB-INF/jsp folder following the same directory structure as the original file. Edit the JSP, and it will override the original ones. The original files will be automatically renamed with a .portal.jsp extension.
For instance, if you want to modify view_user_account.jspf of the dockbar, then use the structure /WEB-INF/jsp/html/portlet/dockbar/view_user_account.jspf. After you deploy the hook, Liferay will rename the original view_user_account.jspf to view_user_account.portal.jspf.