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.
Related
I'm looking for possibility to export or just copy the whole code of a HTML element, targeted with Developer Tools. With whole code I mean not only HTML (this option is good visible in context menu), but corresponding CSS and JS code too.
I found a Chrome extension, which claims to copy HTML and CSS, but it isn't reliable in its core function and doesn't copy JS at all.
We have an existing AEM application where there are 100s of pages. On most of the pages, different css files are getting loaded via a separate network call. We need to optimize this. What I am thinking is if we can:
1. Author the list of css files on the page as a page property.
2. In our code, this page property is read and all the css files mentioned as a property value get combined and rendered on the page. Similar to what is done in css.txt file or embed property.
Please suggest.
Their are few ways to reduce the network calls for css files in AEM
1) Add the css files at the template level so that all the css files are loaded once.
2) Instead of adding the category of the clientlibs use the embed property of the clientlibs. AEM will combine all the clientlibs provided in the embed property into a single clientlib and their will be only network call. But the size of the css file may increase after combining and it will effect the page load time for the first time.
But if your requirement is to author the css files then I will suggest you have a dropdown kind of property in your dialog where all your css files are displayed and the author can select the css according to the need. Once selected then you can apply those css to the html by reading through sightly.
So, it seems you don't want to or cannot use the clientlib functioanlity which is an ootb AEM feature.
No matter what solution you choose - maybe a frontend JavaScript snippet that can decide which CSS files would be needed, or some logic that builds CSS includes at render time based on the components used in the page, or something completely different - I would strongly suggest not to put the CSS files to be used in the editor's responsibility.
If they need some additional styles to be set, use the Adobe Style System. But do not abuse page properties for CSS file configurations.
I mean "hundreds of pages" sounds like a rather small site, but it might still increase your maintenance efforts a lot, when the first people start to complain about wrong colors or font sizes...
I'm working in an AEM project and part of development we are accessing the content using http://localhost:4502/editor.html/content/xyz/en/app.html.
While navigating to another page it is redirecting me to http://localhost:4502/editor.html/content/xyz/en/inko-app (observe carefully the link is without .html extension) and in order to see the new webpage I had to add .html extension manually.
Is there anyway I can automate this only for development environment?
Versions used:
AEM: 6.3
build version :20170420
I have gone through Adding .html extension to page selected but it is not quite useful
Can you check if in your sightly or java where you are declaring the page path, have you added .html as extension or not?.
For exmaple :
In your sightly if you are getting page path as "${currentPage.path}", the value will be without html, you need to explicitly add .html to
"${currentPage.path}.html" like this.
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
I'm using NetBeans 7.2.1 for my developments with CodeIgniter/Bonfire.
In my controllers i'm loading my for the view needed JavaScripts via
Assets::add_js($this->load->view('admin/index_js', $data, true), 'inline');
to preparse some php variables in the JavaScript (like dynamic url's).
This forces me to save these JavaScript files witht he extension ".php" so that i can load it via
$this->load->view
All these JavaScript files are using the filename syntac
*_js.php
Since i load it via view and Assets with "inline" parameter i can't put the
<script>
</script>
tags in the script so NetBeans is not recognizing it as JavaScript and i have no syntax highlightning and no formatting options.
Any idea how i can get it that NetBeans can recognize it as JavaScript?
Thanks a lot.
Okay... got it...
One of my collegues made a change to the assets library to "erase" the script tags from assets::js inline included files:
http://forums.cibonfire.com/discussion/1134/assetsjs-inline_js-change-to-load-js-via-view#Item_1