TYPO3 Bootstrap Package: Picture smaller / adding picture layout - typo3

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.

Related

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.

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 ...

Equivalent of sectionIndex in Neos

In TYPO3, if I need to create a menu for the different elements inside a page, I use the sectionIndex property. With Neos, how can I build a navigation for the elements inside a page?
I don't think you can, right out of the box.
That would require all elements on the page that you want to link to to have an ID attribute. In TYPO3 CMS all of the elements rendered with css_styled_content had one.
However there are multiple ways to do it with custom content elements. Like creating a section wrapper element with title and anchor id, wrap every section in such element and then create a custom content element that will look-up all of your section wrappers and make a list of anchor links pointing to sections.

How to create some custom box into a Typo3 web page?

I am very new in Typo3 world (I came from Joomla and WordPress) and I have some doubts related a thing that has been requested by a customer that use Typo3 for its site
He ask me to create some colored boxes into a specific page. Each of these boxes simply must contain text or links.
How can I do this?
I am thinking that I can solve in the following way (but I have not idea if this is a GOOD solution):
In the backend I go in the Page section and I open the settings related to the page that I have to modify
Here I have 3 columns (Left, Normal, Right) and for example I add a NEW Regular Text Element into this central column
Now appear to me the wysiwyg editor, so I click on the Toggle text mode icon and I pass from the wysiwyg mode to the pure HTML editor's mode and now I will create some div tags (settings the CSS settings for the background color and the dimension) that rappresent my boxes (and into these div I put their textual contents).
Is it a possible solution or is it a bad solution?
Tnx
Andrea
You may either use the RTE typoscript config to add some new paragraph styles, which will make the boxes or use the section_frame field in tt_content, a field called "frame" in the backend when you edit a content record. Both solutions would just need some typoscript (which you will deal with very often in the TYPO3 world) and CSS code.
If you need some more structure in the backend, there is also an extension for that called multicolumn. If you just need "more" columns in the backend (in combination with backend layouts) to achieve different looks, this can also be done by adding some typoscript config. To give you a more precise recommendation, some sort of scribble or design screenshot of what you want would be nice.

Joomla: How to show a different image on every page

I'm new to Joomla, but I figured out how to set it up and create my first joomla template which only includes the content area and a top menu.
Now I want to display a different images on every page.
I do not know how to do it in Joomla, because as far as I know I can only write articles (with images in them, which is not what I want) and include them in the Menu Items as Layout: Article.
Can I somehow create my own parameters for the Layout: Article and use them in my template? The cms user should be able to decide which image to show on each "page".
You can do it by means of a module. You can define for which menu position each module is visible. You can put any article inside a module with a Article as Module extension
You can find a lots of modules at http://extensions.joomla.org/ which you can install from your administrator and enable it on a position to show different images on different pages.
check this page
http://extensions.joomla.org/extensions/photos-a-images/images-rotators
Header Image
https://support.pillwax.com/open-source/doku.php?id=joomla:header_image
This allows you to place your images in a folder and name them according to the page. You can match to articleid, menuid, category, section, or even show a rotating random image.
You would then just need to publish the module in the correct position.