Is it possible to set a default value for a twitter image through TCAdefaults in Page TSconfig typo3 - typo3

I know I can do it for the title and description but is it also possible with the image there?

There is no way to work with a TCA default value here, since the actual field does not contain the information about the related image, but just the number of attached relations. Anything else is provided by the sys_file_reference table, which is used to handle the relation to the images.
So to solve your problem you should work with a default image in the Fluid Templates for your pages, that will always be used, if there is no related image available.

Related

TYPO3 Bootstrap Package: Picture smaller / adding picture layout

I'm using the TYPO3 bootstrap package. The picture in a content element is always 100%. I would like to get the picture smaller (fixed at 20px). First I thought of using TSConfig to adjust the size. But this doesn't work because I have images I would like to still have 100%. So I think the best way is creating an additional content element layout. How can I add a new dropdown entry?
You can add items to every dropdown list with TSConfig. In your case you want to extend table tt_content and field layout.
TCEFORM.tt_content.layout.addItems.1525215969 = Your layout name
The number can be any number you want. It just has to be unique.
See the official documentation for details.

Typo3, set title for Mask Elements

I have a typo3 server and using the mask extension. When an editor creates a new mask element, there isnt a title in the list view. Its always "no title":
I checked the database and found the titles in the db in the field: tt_content.header but no way to set them automatically oder manually by an editor. Anyone have an idea how the title can be set automatically? Oder manually by an editor?
ext:mask has the option to reuse existing fields of tt_content for new kinds of content elements (CEs). use it to get the bonus of better interoperability with TYPO3.
TYPO3 has a logic how to show records (content elements) in the backend. one of it is the usage of the fields header and description. if you reuse these fields your CEs will look like others automatically.
If you use other fields you need to declare your fields for usage AND in case you change the kind of a CE from your kind to e.g. TEXT with Media the header stays.
Especially header is handled in the layout/partial of FSC or CSC global for any kind of CE. if the handling/rendering is changed (e.g. special layout) in an installation your CEs need special effort if they have their own building of the header.
Try to use the same fields as existing CEs and your life can be easier.
I'm having the same issue, but I found a way around it for the meantime. I edit the mask element and chenge its type to something elseโ€”like Textโ€”where I can set the title. After typing the title I save it, then change back to mask element and save again. This works by me without losing the content of the mask element. This way I can see the title in typo3 backend when I view as list or page or add content from another page. As I said, it doesn't solve the problem, but can help until there is a proper solution.
EDIT
I've just found another solution. You can add the title field to en existing mask element. To do it, go to ADMIN TOOLS > Mask, click your mask element to edit it. Add a new item by dragging the ๐—ฆ๐˜๐—ฟ๐—ถ๐—ป๐—ด item (the one on top of the list of available items) to the right where your items are. Then in General under ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ dropdown choose an ๐—˜๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด named:
๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ: (๐—ต๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ)
Save, close, go to your page to add your title. This still doesn't add the title field automatically to all mask elements, but it is a step forward.
If anywhere, you should be able to set a static title automatically in your page tsconfig. You could to something like
mod.wizards.newContentElement.wizardItems.mask.elements.[title of your mask element].tt_content_defValues {
header = My Awesome title
}
Personally, I usually give every mask element a header field and ask content editors to fill it in.
See also this discussion on Mask elements and backend titles.
Hope, this helps.

Some links displayed as text in TYPO3

I have added links to a list of sentences in my TYPO3 backend.
In the frontend, some of these sentences are rendered properly, with a link to them. However, some others are rendered as plain text, with the tag visible.
View of the text in the backend
View of the rendered text in the frontend
What caused the problem, and how can I correct it?
your description of the error is not good enough to give a good answer. please explain more in detail what you are doing: templates, configuration, ...
for the moment I guess: you use fluid-templates and have fluid-variables which contain the rendered content.
instead of outputting the content of a field directly (like {fieldname}), where the rendering is done by fluid you need to output the already rendered output without interfering of fluid (rtefieldname->f:format.raw()}) as for RTE-fields the content is already rendered in html. otherwise all specialchars are converted to show as given.
It might be that the <a> tags aren't closed properly.
Try checking the HTML code from the backend (by clicking the <> button in the backend). See if the </a> tag is where it should be, at the end of each sentences.
You need to find the difference between the lines that work and the lines that don't.

Layouts for news-articles in the news-extension for TYPO3

While it is possible to choose and edit layout variants for the plugin and so for e.g. list views it seems impossible to have a choice of layout variants for a single news article, which then could be rendered differently in the list or single view. As it was possible with rgnewsimg ...
Any ideas how something like this could be achieved?
Thanks!
This would really be a nice function. On your own you can extend news and add a select field to news records to configure the detail layout. If you extend the extension well, you can access this field in fluid template then.
Another solutation would be using the categories for changing the detail view. You could add categories like "Style1" or "Style2" and then access the selection in fluid. It is possible like this, but its quite dirty.
And perfect would be a ViewHelper to allow for conditions in fluid regarding the aspect ratio of the first image, ie. to control the news article's layout depending on the used image:
if image's aspect ratio < 1 (= Portrait) ...
Unfortunately I can't code that ...

How to add image to a table column in Wicket?

I am creating table with AjaxFallbackDefaultDataTable. I want to add image to each column and when user clicks any column for sorting, I want to change this image.
Is this is possible?
This is probably best handled by css.
If you look at this example of an AjaxFallbackDefaultDataTable, you'll note that with no work at all, the headers change background color when clicked.
This happens because of wicket-defined css classes "wicket_orderUp", "wicket_orderDown", and "wicket_orderNone" on the header set by the callbacks when you click on columns, and some default css supplied by wicket.
If you create css that sets a background image for these classes, possibly qualified by other css hierarchy if you don't want it everywhere, you should be able to get changing images with no Java code.