IRC logs

20160323

Logs from channel #fedext on freenode - our official support channel.

IRC log range: 20160323*

20160323

  • 04:47:15 <MrPiff> Hi! Is there a way to hide fluidpage templates via TSConfig when using multiple provider extensions for multiple page trees?
  • 05:02:23 <Denyerec> Hey guys - I'm trying to figure out, after a long break, where fluidtypo3 sits with fluid_styled_content
  • 05:37:56 <cweiske> fluid_styled_content is responsible for styling the standard typo3 content elements
  • 05:38:11 <cweiske> while fluidcontent allows you to create custom content elements
  • 05:39:09 <cweiske> and fluidpages allows you to define custom page layouts
  • 05:46:30 <Denyerec> Can you not create additional fluid_styled_content CEs ?
  • 05:47:33 <cweiske> probably
  • 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:01:00 <flower> Path: typo3/sysext/fluid_styled_content/Resources/Private/Partials/Menu
  • 09:01:57 <flower> Know i would like to find out, how can I integrate a image of each page in the menu
  • 09:03:36 <flower> i hope somebody can help me
  • 09:05:55 <cweiske> https://fluidtypo3.org/viewhelpers/vhs/master/Content/ResourcesViewHelper.html is your friend
  • 09:06:16 <cweiske> use the page's uid as uid, "pages" as table and "resources" as field
  • 09:07:09 <cweiske> no, not "resources"
  • 09:07:12 <cweiske> use "media"
  • 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:12:16 <cweiske> what did you try?
  • 09:12:22 <flower> i tried to do what you told me to do, bit it do not work
  • 09:12:23 <flower> <v:content.media table="'tt_content'" field="'image'" record="{foo: 'bar'}" uid="17" as="NULL"></v:content.media>
  • 09:13:27 <cweiske> this does of course only fetch the FAL images, not display them
  • 09:14:37 <cweiske> try this: http://p.cweiske.de/309#phork0.htm
  • 09:14:44 <cweiske> of course you have to adjust the parameters
  • 09:17:17 <flower> only the two lines you have sent? or with the snipped i have sent before? both versions do not work
  • 09:17:36 <cweiske> only the two lines I sent, but you have to adjust them
  • 09:17:44 <cweiske> how did you adjust them?
  • 09:18:07 <flower> i got a error
  • 09:18:08 <flower> Oops, an error occurred! Code: 201603231417422b1fecc2
  • 09:18:21 <cweiske> you have to enable debugging to see more
  • 09:18:35 <cweiske> http://cweiske.de/tagebuch/typo3-cli_dispatch-debugging.htm#conclusion
  • 09:18:39 <flower> what do you mean with adjust them? shall i wrap your first line with an image-tag?
  • 09:19:03 <cweiske> do you see a resemblance between the code you pasted and the first line of my code?
  • 09:23:31 <flower> no not really
  • 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.
  • 09:39:28 <flower> or I did not understand
  • 09:55:40 <flower> i rad your description again and again, but i do not know, what I shall change know
  • 09:55:48 <flower> read instead of rad
  • 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:06:43 <flower> https://gist.github.com/anonymous/8990b66b99678c208874
  • 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