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
5
votes
2 answers

TYPO3 ver. 7.6.2 - Condition ViewHelpers evaluated only once

Problem: I wrote a conditional VH (extending AbstractConditionViewHelper) and it works as usually, anyway I realized that in non-cached version it is evaluated only once. Initialy I thought that's my bug, but checked common and the problem…
biesior
  • 55,576
  • 10
  • 125
  • 182
5
votes
4 answers

Fluid: Directly access value of array returned by view helper

I've got custom fluid ViewHelper that returns an array, and I'd like to access a value of this array directly in one command. Currently I'm using two commands: {vendor:helper() -> v:variable.set(name: 'data')} Value of foo: {data.foo} Is there a…
cweiske
  • 30,033
  • 14
  • 133
  • 194
5
votes
2 answers

How to show integer 0 but not empty or NULL in TYPO3 Fluid

In my TYPO3 Fluid template I have a value where I would like to check if its not empty before showing it. My way now:
{myvalue}
This works when I type in the backend a value like…
Derple
  • 63
  • 2
  • 5
5
votes
1 answer

Sort elements through child objects

I have an item object with an 1:n relation to categories. Lets say categories is a numeric value. I tried to sort all items as per categories with setOrderings() but it doesn't work. //inside findAll() in my ItemRepository…
d4ny3l
  • 163
  • 18
5
votes
1 answer

Fluid condition with ContainsViewHelper

i use this condition in my fluid template: ....do something
chicky
  • 103
  • 1
  • 9
5
votes
3 answers

How to assign variable in fluid?

I want viewhelper that can be helpful to assign variable in fluid, I dont want variable to be passed from controller.
Vishal Tanna
  • 1,165
  • 2
  • 12
  • 36
5
votes
3 answers

Elastic css framework with rails 3 and haml/sass?

I recently stumbled upon "elastic css" framework, which looks like a good thing to me. I tried blueprint already but I must say this seems to be an overkill for me (tried it with compass). So my question to you rails/xhtml webdevelopers out there:…
5
votes
1 answer

TYPO3 - Call another repository

Is it possible to call a function in different controllers? I need to call FindByCategoryGrouped($catId) in designRepository.php and getCategories($catId) from categoryRepository.php public function listAction() { …
Jeppe Donslund
  • 469
  • 9
  • 25
5
votes
3 answers

When to use ems instead of percentage in CSS?

I've been trying to learn responsive coding lately, and the books and tutorials i've gone through have been constantly shifting between using ems and percentages. So i was wondering, when is it appropriate to use ems, and when is it appropriate to…
Baard Kolstad
  • 49
  • 1
  • 5
5
votes
1 answer

TYPO3 TCA select, NULL value in items array

I have made an extension in Typo3 4.5 with extbase and fluid. Now to insert some data i use the backend module 'list' that makes some forms with the TCA of the tables. To make a select box optional, I insert an item before the foreign table like…
Agash Thamo.
  • 748
  • 6
  • 18
5
votes
3 answers

How to keep outer div not be pushed out by inside div's padding/margin?

Here's the jsfiddle example Here's the html:
header
right
Here's the…
Long Nguyen
  • 153
  • 2
  • 3
  • 10
5
votes
2 answers

Centering a fluid DIV with max-width and absolute positioning

Before someone down votes me for asking yet another centering problem. Please read my situation before judging! I'm familiar with most common techniques for centering stuff but here is my situation. I have a DIV that must be both vertically and…
egr103
  • 3,858
  • 15
  • 68
  • 119
4
votes
2 answers

Generate webp image in TYPO3 Fluid

I am trying to have TYPO3 10.4.12 generate webp images as described in the example on this page:…
crsdahl
  • 545
  • 4
  • 17
4
votes
2 answers

How to set the link-title as Linktext with f:link.typolink viewhelper in TYPO3 9.5

I have build a custom content element with a link from field "header_link". How can I set the title of that link as link text? In the fluid template I use the link.typolink viewhelperin this way:
m4a
  • 131
  • 1
  • 9
4
votes
4 answers

How can I trigger a download with typo3/extbase?

I'm using Typo3 with extbase and fluid. I have a Controller with an action called downloadAction(). After calling the action the system tries to render the download-template (but I just want to start a download). public function downloadAction($id)…
koalabruder
  • 2,794
  • 9
  • 33
  • 40