Layouts for news-articles in the news-extension for TYPO3 - 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 ...

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.

TYPO3: Backend Usability when using Bootstrap and Grid Elements

I don't know if this is the right place to ask this question but I figured I might as well try to get an answer here.
My problem is the following: I'm a huge fan of Bootstrap and all there components so I'm genreally using them in every project im working on. So when I'm using container and container-fluid with different row's in between for sertain content-elements I haven't figured out a way to implement this inside the backend in an user-friendly way.
The way I used to do it was simply use the Grid Elements Extension to simply create containers, row's and col's and implement those within each other in the backend. Works fine, but its a whole lot of work for the user of the site to create content. I don't know if my explenation was clear, english isn't my first language and I don't know how to describe it in another way, but here's a picture of what I'm trying to say:
As you can see there are a lot of elements nested within each other so the user or admin has to actually "know" how bootstrap works to edit content without destroying the layout.
Is there any other way I can achive full flexibility for the content, e.g. a bunch of container's within a container-fluid as a wrapper and another bunch of cols's as children of the container?
I've tried to work with Mask, which seemed to be the solution at the beginning, but in the end I had to create one mask object for every possible way an element could be loaded, so there goes this option..
Does anyone else have this kind of "problem" or is there a simple (or hard, idc) solution I can use?
Thank you guys :)
I understand your "problem". My opinion: As soon as you have a page layout with multiple containers (container / container-fluid) and a flexible grid layout, I guess there is no better way without restricting flexibility or have some dirty logic / code. In some (minor) cases, you can help yourself with layout classes (DB field "layout") and some logic in fluid + a viewhelper to calculate the grid columns (e.g. imagegallery, where you can set the columns in backend and calculate the columns in frontend). But in my opinion, this is the most flexible way.
There are some people who solve this with new content elements and inline relation to its content elements. But IMHO this is more confusing for editors to see a grid layout in the backend and the possibility to flexible add content elements via content element to the container / column of choice.
A small, but effective useful helper for editors is to colorize your grid elements in the backend to help the editor to recognize different grids.
In my experience, editors can handle nested grids better than searching for multiple dropdowns in elements to understand grids.
Offtopic: editors survived templavoila, they will understand grids :-)

typo3 text and media position and picture width has no effect

In my typo3 6.2.31 page the text and media content doesn't work properly.
Changing the width and position of a picture has absolute no effect.
what could be the problem in this case?
"Text & Media" ? that sound like FSC (Fluid Styled Content) and that was not very elaborated for 6.2.
you might need to evaluate those setings in the templates / partials for your CEs (Content elements).
In general: all those input fields could be evaluated in the rendering of an CE. maybe someone wanted an simple rendering with less option for editors to mess around with the design. So he ignores those inputs (but forgot to disable the display in BE for editors).
Have alook whether you use CSC or FSC.
With CSC the rendering is done in typoscript.
With FSC the rendering is done in fluid templates. Look for all pathes where templates and partials are (re)defined.
add on:
For CSC the rendering is defined in typoscript. use the TSOB (TyposcriptObjectbrowser) to identify the involved parts. You can start with tt_content.textpic in that COA you will find .10and .20.
.10 renders the header, .20 renders the body of the CE.
Follow the definition and look what fields are used. You might compare an empty installation with yours to see mdifications to the default rendering.
First you should look where the image are rendered and if these fields are used, too. Maybe the image dimensions are hardcoded in your typoscript.

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.