When ClientBundle created, images from bundle are represent on page as inline data (for ex. img src="data:image/gif;base64,R0lGODlh.... ) in FF, CH. Images are assigned to background so "background-position" attributes works fine.
As usually, MS IE makes problems. Instead of embedding image, IE creates image map/texture atlas/image cache (not so sure about the name) so "background-position" can't be used. Is there any way to disable creation of the image cache.
Also, is it possible to control data embedding. For long list of for ex. list items generated html is very big as same data is repeated from item to item.
How are you including the images? with #Sprite? Create one #Sprite style with nothing in it but the image. Then create styles for all the rest of the css as separate styles. In the code you can set an element to multiple styles. As for ie, look at using chrome-frame when it is an old version of ie.
Related
I have just started my Typo3 journey. I want to put 2 content elements side-by-side (in one row). Can anyone tell how is it possible. Because whenever I place any content element, it is displayed as a block and fill the entire row.
Thank you for your time and consideration :)
You have to use container elements which come with the extension 'container'. Please have a look at https://extensions.typo3.org/extension/container
There is no build in solution for your problem.
But in TYPO3 you are free to build any kind of html structure for your output. This is necessary as you also can do any rendering of content. either with your own CSS and HTML-markup or if you use frameworks like Bootstrap.
You can build a new page layout, or any special content element which contains other content elements.
Changing layouts can (and should) be reflected in backend-layouts. (https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/Backend/BackendLayout.html) (there are a lot of other tutorials)
But you also can build/ use individual defined containing content elements. Her you can get support by different extensions (eg. mask, DCE, gridelements) or define it completely on your own (https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/ContentElements/Index.html)
I have a TYPO3 installation where I want to replace roughly around 200 images. The original images have not been optimized for the web well and some have unfitting extensions (like PNG for an image that should clearly be JPG).
Other than going into each individual page and replacing the images, is there an easy and fast way to replace all those images?
It TYPO3 8.7.25
Why don't you use the file list module and just replace the images? FAL (File Abstraction Layer) should handle the file relations in all content elements.
I'm trying to create a MailChimp template where an image is editable using mc:edit
Here's the code:
<img class="flexibleImage" mc:edit="top_image">
This seems all good, but once I edit this image using the MailChimp editor, I lose the original class "flexibleImage" and all other class and style info related to that img element.
How can I create a template with an editable image and maintain (or add) that class?
For anyone else with the problme, this answer is based on a response from MailChimp support:
It looks like it isn't possible to keep a custom class attached to an
editable image. What you could do instead though is apply the class
to the image's containing element. So if the image is in a <div>, add
flexibleImage to the div, and then update your CSS rules to point to
.flexibleImage>img.
This happens because the image you want to edit is inside an mc:repeatable block that in turn is inside another mc:repeatable block
Even four years later this is still an issue.
The other route is to put mc:edit on the parent container, and have images managed through there, but you lose the Image uploader box, which is poor user experience.
You can go into Settings when you have uploaded a new image and put the sizes in there. Not ideal, but Mailchimp is to blame here (no such issue on Campaign Monitor templates).
I've a Image (logo.jpg 800x800) uploaded in the Backend of typo3. This image is used in many different articles. I've placed the image in these articles in many different sizes, sometimes 400x400, 200x200, etc..
So typo has rendered the smaller version of the original 800x800 logo.jpg.
Now I've to replace the logo with a newer version. I thought I can use the function "replace file" in the media backend from typo3. So i used this function and replaced the logo. Now the new file logo.jpg is in the backend, but all articles show the old version.
My question is, is there another way to replace a previously used image? Or is there a way to "restart" the rendering process in typo3 for all images. It looks like, the smaller version of the image are still in the cache or something like that. But clearing the cache doesn't help.
It depends on your TYPO3 version.
prior to 6.0 (and without extension 'dam') each file was copied on each
usage. so if you have used an image 40 times this image exists in 40
copies on your server. and any change to the original (modify/delete)
would change nothing to these copies.
from these copies calculated versions are build. so further 40 images
could be stored on your server.
the copies are stored, depending on the field they are used in, beyond
/uploads/...
possible places: /uploads/pics/ /uploads/tx_myext/
the calculated images are stored beyond typo3temp.
to replace one image you need to: remove all calculated versions.
and replace all copies with the changed image.
with 6.0 FAL was introduced and images/files were not copied any longer,
but referenzes are stored. Also calculated images are stored by hash so
a resized image can be reused instead of reclculated,
It's just a problem that FAL is not working completely satisfying and a
lot of work is done to fix this for 6.2. After that a change of an file
may result in changes in every usage.
Instead of using DisplayFor and EditorFor, I would like to create a more generic ContentFor. In that Html extension it would take into account Metadata values to determine how to render the resulting control. The only piece of the puzzle I am not am to determine is this: Is there a way to determine if I am currently rendering a DisplayTemplate or an EditorTemplate. As a real-world example of this, when rendering a string, for the display version I would like to render it as a , but when rendering the editor version, I would want to render it as a text box.
To better explain, let's say I have two templates called Address.ascx, one in the DisplayTemplates directory and one in the EditorTemplates directory. I would like both of them to use ContentFor to render, but in the display version it renders as a label and in the editor version it renders as a textbox.
Using two ASCX files to call a single file control (which is doable, just do another RenderPartial or DisplayFor/LabelFor) doesn't make sense to me. It breaks the "seperation of concerns". Label displays labels, and Display displays values, it doesn't make sense for a control to try and figure out what way you want it to display.
If you want a use a custom display or label for a property, use the UIHint data Annotation.
[UIHint("MyCustomControlName")]
Then in the DisplayTemplates and EditorTempaltes create a "MyCustomControlName.ascx" file to display that property however you want. Additionally, the ascx controls can read custom Model Metadata and do whatever it is you need done. Example at http://weblogs.asp.net/seanmcalinden/archive/2010/06/11/custom-asp-net-mvc-2-modelmetadataprovider-for-using-custom-view-model-attributes.aspx.