Questions tagged [fluid]

Fluid is a an XML-based templating system for TYPO3. With Fluid, all the code for the view logic moves to the template - e.g. loops, if/else switches and similar.

Fluid is a an XML-based templating system for TYPO3. With Fluid, all the code for the view logic moves to the template - e.g. loops, if/else switches and similar.

The standalone version can be used out of the box and there are integrations for TYPO3 and Neos

It looks like this

// this
<f:count>{myArray}</f:count>

// or  
{myArray -> f:count()}

Official documentation: https://github.com/TYPO3Fluid/Fluid

Since 2017-06 there is also Fluid for whose syntax is not related to php-fluid but which aims to be close to .

1458 questions
56
votes
6 answers

Is there a way to use max-width and height for a background image?

That simple. Moving my layout into a fluid territory, working on scalable images. Using the img tag and setting max-width to 100% works perfectly, but i'd rather use a div with the image set as its background. The issue I'm running into is that the…
technopeasant
  • 7,809
  • 31
  • 91
  • 149
20
votes
1 answer

Create an optional foreign key using the fluid-API for Entity Framework 7

I'm trying to create an optional foreign key using Entity Framework 7 and the Fluid-API. In EF v6.x we had the option to add this using .WithOptional or .HasOptional, but I cant find any equivalent functionality in EF 7.. any ideas? Br, Inx
Inx51
  • 1,911
  • 3
  • 24
  • 44
18
votes
6 answers

Why use long decimal point values in CSS percentage widths?

I've noticed in my own work that 3 fluid columns fill out their parent element much better when their widths are set to 33.333% as opposed to just 33%. I've also noticed when researching various CSS frameworks (i.e. bootstrap.css) that they have 14…
wavematt
  • 411
  • 1
  • 4
  • 17
16
votes
11 answers

TYPO3 Fluid complex if conditions

I am trying to write the following if condition in fluid but it is not working as I would hope. Condition As part of a for loop I want to check if the item is the first one or 4th, 8th etc I would have thought the following would work but it display…
dmanners
  • 2,062
  • 1
  • 18
  • 24
15
votes
1 answer

How to access properties of a FileReference Object in fluid

Below you see the debug for an object of type FileReference in fluid. In fluid the debug looks like this: {fileReference} The question is how do I access the properties highlighted in green, being width, height, and hovertext. The…
Florian Rachor
  • 1,574
  • 14
  • 31
12
votes
3 answers

2 column layout (Left column fixed width, right fluid + clear:both)

Just need help as I have been trying sort this out for ages now. What I need: I've got a 2 column layout, where the left column has a fixed width 220px and the right column has a fluid width. Code is:
Ondrej
  • 2,287
  • 6
  • 18
  • 17
12
votes
7 answers

Get the current language code inside a TYPO3 Fluid Template

Is it possible to get the current language key (or code) in a TYPO3 Fluid template? In the meantime I've found another solution using a view helper found here:
Rico Leuthold
  • 1,975
  • 5
  • 34
  • 49
11
votes
8 answers

HTML / CSS : Fixed Margin & Fluid Width

How should I make this with CSS: I would like to have 2 divs or more and their width should be in percent, but the margin between the divs should be fixed, in this example 30px The problem for me is the margin between the two divs because I can put…
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213
11
votes
2 answers

How to quickly create custom content elements in TYPO3 6.x

In TYPO3 6.x, what is an easy way to quickly create custom content elements? A typical example (Maybe for a collection of testimonials): In the backend (with adequate labels): An image An input field A textarea When rendering: Image resized to…
Urs
  • 4,984
  • 7
  • 54
  • 116
11
votes
8 answers

Typo3 V6: How to create a content element container? (without TV)

For a project I'm using Typo3 v6.0. I'm looking to create nested content elements, or a content element container. I want to be able to create an inline two-column layout without using a specific template for it. I'm looking to do this without the…
Maurice
  • 4,829
  • 7
  • 41
  • 50
10
votes
2 answers

TYPO3: Pass multiple arguments to a partial from a fluid template

I have a fluid template, from where I call an often used snippet (called "partial"): Template: Partial fbLikeBox.html:
Mateng
  • 3,742
  • 5
  • 37
  • 64
10
votes
7 answers

How to get TYPO3 settings in the utility files?

plugin.tx_xxx { setting { storagePid = 23 } } I want this TYPO3 settings in utility file. Please help me.
Vivek Parmar
  • 773
  • 1
  • 10
  • 26
10
votes
8 answers

Is it wise to use a Fluid Layout?

Google Labs Browser Size I've always preferred fixed-width layouts over fluid-width layouts, one of the main reasons is that I'm able to better understand how the whole picture will be without having to worry about the screen resolution. But now…
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
10
votes
1 answer

Cross-browser SVG in responsive or fluid layout?

I opted to use the Raphaël javascript library for its extensive browser support, but I'm having trouble getting the SVG to display properly in any browser, except for Chrome and Firefox. I've been scratching my head over this for a while now and…
Jason
  • 4,905
  • 1
  • 30
  • 38
10
votes
4 answers

Fluid compare dates

I want to compare two dates. I want to make a condition which checks if the date in my database is older than the date in two days. Here are my two variables: {+2 days} {
zoom23
  • 694
  • 2
  • 10
  • 23
1
2 3
97 98