can someone tell me if Typo3 Fluid templates (*.html) would be precompiled as PHP code and stored in the cache, as Symfony-Twig templates are? If yes, where are the cached PHP-files?
Yes. Fluid templates are compiled into php files and put into a cache. In TYPO3, you typically find these cache files in typo3temp/var/cache/code/fluid_template
Related
I have written an extension with a html template. Inside that html template there is php code. That php code dynamically generates some DOM elements depending on files and folders in fileadmin! Now if I change files and folders in fileadmin and THEN go to my website, the html template of my extension hasn't changed. That means the DOM elements are still the same. Thus the php code hasn't been executed again and typo3 must have used some cached version of my html template. Where can I configure that behaviour and force typo3 to always recalculate my html template (meaning: execute the php code in it!)?
As you have mentioned: TYPO3 uses a lot of caches.
And if something depends on external activities it should be uncached on all levels.
So you need to declare your plugin uncached.
you have not explained what kind of template you use. In case of Fluid templates you might use uncached partials and viewhelpers.
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 searching translated versions of the tx_news translation files. When I open ext/news/Resources/Private/language/ all I find are the default (english) versions of the xlf Files.
I am sure there are translation files in other languages for tx_news, but I was not able to find them. How can I find them? Or can I get them somehow in the backend?
You can get them in the backend - there is the Language module in the menu, where you can set the list of languages for your installation, and download or update the translation files.
Just to be more complete. The translations are served by the translation server, therefore only the default translations are shipped with the extension itself.
As for the core and most extensions, translations are fetched by the Language module in the TYPO3 backend
I am working on asp.net mvc2 project. Due to some limitations I cannot migrate the code to asp.net mvc4 version and due to this I am not able to use the Bundling and Magnification feature for bundling and minifying the js and css files. I used the SquishIt framework to work on this. Can anyone help me to know are there any other good options other than SquishIt framework to work on this task.
I used the following url to implement SquishIt framework:
http://www.codethinked.com/SquishIt-The-Friendly-ASPNET-JavaScript-and-CSS-Squisher
Can anyone help me know how to delete the old files that are created with change in the js and css files without manually cleaning them everytime.
Thanks & Regards,
Santosh Kumar Patro
The best solution for this is to not include the hash in your filename (I assume you are rendering to filename_#.ext). You'd just need to remove the '#' from your rendered filename, then SquishIt will use querystring invalidation by default. This will only keep a single copy of each bundled file on disk. If querystring invalidation won't work for you there is also a relatively new option that allows you to place the hash into the path as a directory, then scrub it out with an IIS rewrite rule.
For more on SquishIt's support for different cache invalidation strategies read this
I have installed TYPO3 on my web server and it use the "Introduction Package" template.
The problem is that I have to work on another TYPO3 online website that use a custom template.
Can I obtain the template of the online website and use it on my local website? (to perform some test in local).
I saw that TYPO3 uses various templating systems and I do not know how this could affect the export\import operation. In Joomla or WP I simply take the template directory and then I copy it into the themes directory but I think that in TYPO3 this operation could be more complex.
The fastest way is to copy these directories:
fileadmin
uploads
typo3conf/ext
and the complete database, then you have "cloned" the original website locally. (assuming that the core stuff is loaded the default way, with symlinks)
Then you just need to edit the database connection stuff and maybe some paths for image magick and so on in the typo3conf/LocalConfiguration.php.