09:00:53 <flower> I want to generate a special menu with images. The images shall be integrated in each page. I want to use the tab "Ressources". I know, that I have to work with fluid templates.
09:07:19 <cweiske> that's how it's called in the database
09:11:52 <flower> thank you for the quick answer, but i already used google to find out, what I can do. I also have seen the link before but i do not know how I can integrate it correctly :(
09:29:47 <NamelessCoder> flower you provide too many and conflicting arguments, to take them one by one: "table" is not needed since the default value is already "tt_content", "record" should probably not be provided at all since it gets resolved automatically and if you do pass it, make absolutely sure it contains the column you identified in "field" argument. You also probably should not specify the "uid" argument (or make it flexible somehow, hardcoding is bad in
09:29:47 <NamelessCoder> general) and when you provide "record" and it is complete and valid, "uid" is ignored (it gets used to load the record if you don't provide it). And don't provide "as" unless you want to be using the media objects as variables in your template. And as cweiske said: this viewhelper you use only returns objects, does not output any tag. To output a tag you need to do something like what cweiske posted.
09:31:00 <NamelessCoder> what his example does, point by point: 1) fetches all FAL records defined in the field by relying on automatic record, uid etc. arguments, 2) grabs the first returned object, 3) assigns that single object as a variable that can then be used below.
09:31:21 <NamelessCoder> second line is the line that outputs a tag generated with that object as media source
09:36:48 <flower> i think the fluid-thing is to difficult for me.
09:38:50 <flower> do i have to add something to the code of cweise? your description says, that he fetchs the images in the first line and shows them with the second line.
10:04:38 <flower> cweise wrote that i have to adjust the parameters. But which parameters did he mean? i only changed the word "resources" to "media" is this correct? How shall typo3 know, that the images, are the images of each page?
10:17:38 <flower> have somebody else the energy to explain me what i have to do know? I'm really desperately...
10:20:19 <NamelessCoder> flower there are two parts you need to do. One is to get the image for the page, the other is to render an image tag with that image
10:24:09 <NamelessCoder> you can get the image with more than one ViewHelper but for your case you probably need v:page.resources.fal (which has the right default values you need). https://fluidtypo3.org/viewhelpers/vhs/master/Page/Resources/FalViewHelper.html
10:25:22 <NamelessCoder> using that one returns an array of FAL objects, that's why cweiske uses v:iterator.first() to extract the first one. You can also iterate them with f:for (doing so is a common task in Fluid and you should know it, if you don't, you should aim to learn it).
10:27:02 <NamelessCoder> if I were you I would aim to solve the following problems in that order:
10:27:50 <NamelessCoder> 1) get your development context fixed. If you don't, every single error thrown by Fluid will be unreadable to you (will just say "Ooops, an error occurred") and you will be working in the dark. See cweiske's link how to do that.
10:29:10 <NamelessCoder> 2) copy-paste cweiske's example code and replace "{v:content.resources.fal(field: 'settings.images')" with "{v:page.resources.fal(field: 'images')". Why? Because you want *page* images, not content ones. And because the "field" is different in pages compared to in content.
10:29:43 <NamelessCoder> 3) Address any errors *that* gives you. Like not having included the VHS namespace which enables you to use anything prefixed with "v:" in Fluid
10:51:33 <flower> that is a good reference point. I will keep you up to date if i know more
11:20:49 <flower> My boss told me now to insert only normal text-elements with images ans Links. So I can't try this version anymore. I copied now the whole chat and will look in my freetime again over it.
11:21:26 <flower> thank you so much for your help and patience