IRC logs

20140826

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

IRC log range: 20140826*

20140826

  • 09:42:22 <Guest|79532> hi all
  • 09:42:40 <Guest|79532> i know, this is the wrong channel for this but i dont know where to ask :S
  • 09:42:51 <Guest|79532> i just created an extension with extension builder
  • 09:43:35 <Guest|79532> and everything works fine, but if i click on a detail-link from the root i get an error msg "Required argument "alt" was not supplied."
  • 09:43:54 <Guest|79532> google does not find anything about it
  • 09:44:11 <Guest|79532> and i did not modified anythink on the template
  • 09:44:33 <batjony> Guest|79532: you can ask in #typo3
  • 09:45:20 <Guest|79532> oh thanks, didnt knew about this channel
  • 09:54:02 <batjony> guys i have a custom content element which shows pages from particular sys folder
  • 09:54:21 <batjony> currently it shows by default the first page in this sys folder like https://gist.github.com/momchilgoos/531616463c0d0dbdf7d1
  • 09:54:36 <batjony> but the idea is to have some simple pagination - prev and next
  • 09:55:05 <batjony> next - will show the page content from the next page in this sys folder
  • 09:55:20 <batjony> prev - will show the page content from the previous page in the sys folder
  • 09:55:46 <batjony> some ideas how to implement this prev/next
  • 09:56:30 <batjony> probably i should get the prev/next page uid and then use <v:content.render pageUid="{pageUid}">
  • 09:57:14 <batjony> but what do you recommend
  • 10:16:39 <mrboe> hey @NamelessCoder do you have a minute
  • 10:17:24 <mrboe> i have a question about settings.useTypoScript in the FBT
  • 10:19:41 <mrboe> when i use plugin.tx_fluidbootstraptheme.settings.useTypoScript = 0 and go to page settings and set: settings.position = right the FE uses the value of the Page settings but the BE uses the value wich is set in TS Constants
  • 11:38:05 <batjony> i want to check if some variable is NULL or not, and i use <f:if condition="{someVar} != NULL"> but it does not work
  • 11:38:05 <FT3BOT> ¯\_(ツ)_/¯
  • 11:38:11 <batjony> Am i doing somethign wrong ?
  • 11:42:03 <mrboe> @batjony have you tried "{someVar} != 'NULL'"
  • 11:59:20 <batjony> mrboe: still does not work
  • 11:59:28 <batjony> https://gist.github.com/momchilgoos/b208e42fe6a3a84627b0
  • 11:59:47 <batjony> could someone explain it
  • 12:00:34 <batjony> why if {someVar} is NULL the condition {someVar} != NULL is true ???
  • 12:09:01 <randomresult> hi there
  • 12:09:28 <randomresult> im trying to use the options in flux form to display an icon
  • 12:09:48 <randomresult> as long as i take ../typo3conf/ext/myext/some/path/ it works
  • 12:10:02 <randomresult> as soon as i want to use EXT:some/path it doesnt
  • 12:10:20 <randomresult> this is my code
  • 12:10:30 <randomresult> options="{group: 'Boxes', icon: 'EXT:/Resources/Public/Icons/bootstrap/glyphicons_355_bullhorn.png'}"
  • 12:11:02 <randomresult> this works ../typo3conf/ext/myext/Resources/Public
  • 12:11:14 <randomresult> any ideas @NamelessCoder or xaver ?
  • 12:13:34 <xaver> EXT starts in typo3conf/ext/ normally randomresult
  • 12:13:53 <randomresult> so EXT:myext?
  • 12:13:56 <xaver> options="{group: 'Boxes', icon: 'EXT:yourprovider/Resources/Public/Icons/bootstrap/glyphicons_355_bullhorn.png'}"
  • 12:14:34 <randomresult> EXT:dscdesign/Resources/Public/Icons/bootstrap/glyphicons
  • 12:14:40 <randomresult> does not work
  • 12:14:59 <randomresult> gimme a sec... deletoing temp to be sure
  • 12:15:30 <randomresult> no
  • 12:15:35 <randomresult> latest dev of all
  • 13:08:26 <batjony> NamelessCoder: do you have idea why if {someVar} is NULL the condition "{someVar} != NULL" is true ???
  • 13:08:36 <batjony> https://gist.github.com/momchilgoos/b208e42fe6a3a84627b0
  • 13:31:49 <mrboe> any ideas how to create a field to select a fileadmin folder?
  • 13:37:33 <benjamin_654> randomresult: with the icons its a special case because the backend here uses relative paths ..
  • 13:37:53 <randomresult> benjamin_654 solution?
  • 13:38:29 <benjamin_654> randomresult: use a string like this ../typo3conf/ext/yourextension/Resources/Public/Icons/ContentAccordions.png
  • 13:38:42 <randomresult> ok. thats what i did
  • 13:39:51 <benjamin_654> jep, thats state of the art ..
  • 13:41:57 <batjony> mrboe: 10x for your comment in the gist
  • 13:42:10 <mrboe> does it work?
  • 13:44:13 <batjony> mrboe: ya it works, i will use it, but its really strange why the standard condition way "{someVar} != NULL" does not work
  • 15:11:53 <BenjaminR> batjony: maybe you like to use v:condition.variable.isNull()
  • 15:15:08 <Guest|86972> hello.. can somebody help me? my problem:
  • 15:16:20 <Guest|86972> i would like to link a file with: <flux:wizard.link activeTab="file"/> / what i see in the front end is: file:48 but i would like to have the whole path with the filename like this.. ../folder1/folder2/filename.jpg
  • 15:18:20 <BenjaminR> Guest: I think link -> v:link.typoscript() will help you out
  • 15:20:44 <Guest|86972> you mean <v:link.typolink ??
  • 15:21:53 <BenjaminR> yap
  • 16:20:05 <batjony> BenjaminR: i do not see such helper v:condition.variable at http://fluidtypo3.org/viewhelpers/vhs/
  • 16:21:20 <BenjaminR> got renamed to v:if.var.isNull - sorry
  • 16:22:13 <BenjaminR> but there might be a problem still ;) "var" is a reserved namespace
  • 16:23:05 <BenjaminR> puh i guess website is not up to date right now - please have a look at your local vhs clone
  • 16:23:13 <BenjaminR> should be where i said
  • 16:24:56 <batjony> BenjaminR: i see, but still I think I can not use it in my case, because for example if something is not NULL i should render page A, else render page B
  • 16:25:49 <batjony> i see here "then" and "else" are inline arguments, and I think I can not use them
  • 16:25:59 <BenjaminR> there are then and else always
  • 16:26:04 <BenjaminR> just use them - also tagbased
  • 16:27:36 <batjony> so you mean that this is possible <v:if.var.isNull> <f:then>...</f:then> <f:else>...</f:else> ?
  • 16:27:36 <FT3BOT> ¯\_(ツ)_/¯
  • 16:28:06 <BenjaminR> batjony: not only that i think :) i know :)
  • 16:29:02 <batjony> nice 10x
  • 16:29:32 <batjony> BenjaminR: one more question, I am making some kind of pagination, do you aware with v:iterator.next ?
  • 16:29:44 <batjony> i am not sure how can I use it
  • 16:30:22 <batjony> i have a custom content element which renders pages from particular sys folder, and should have next and prev which should walk through the pages in this sys folder
  • 16:30:45 <batjony> i have an array of all pages inside the folder
  • 16:31:44 <batjony> and by default i am on the first page, how can I use v:iterator.next to get the next page
  • 16:35:04 <BenjaminR> there are arguments needle and haystack
  • 16:35:28 <BenjaminR> v:iterator.next(needle: allpages, haystack: currentpage)
  • 16:35:36 <BenjaminR> didnt use yet - but think it works like that
  • 16:35:44 <NamelessCoder> reverse order ;)
  • 16:35:56 <BenjaminR> ah yes ;)
  • 16:36:02 <BenjaminR> Ty Claus
  • 16:36:44 <NamelessCoder> says FALSE if there are no elements *after* $needle inside $haystack - but my memory fails me whether it renders then/else nodes or returns the next element...
  • 16:37:32 <batjony> ok if I have an array {pageItems} which is key/value array where key corresponds to the page Uid and the value contains another array of the page properties
  • 16:37:42 <batjony> and if I am on a page with uid 8
  • 16:37:45 <batjony> how can I use it
  • 16:37:51 <NamelessCoder> I think it returns the next element, or you'd have an easier time working with it this way. In which case... {v:iterator.next(haystack: myArray, needle: currentObject) -> v:variable.set(name: 'next')} and <f:if condition="{next}">...</f:if>
  • 16:37:52 <FT3BOT> ¯\_(ツ)_/¯
  • 16:38:31 <BenjaminR> yap returns next element or false
  • 16:38:47 <NamelessCoder> brain works :)
  • 16:39:36 <BenjaminR> extends containsvh -> abstractcontainvh so you can have then/else inside or use the result as NamelessCoderßs example shows you
  • 16:40:06 <NamelessCoder> it is marked as a condition ViewHelper but I think it doesn't support the then/else child behavior
  • 16:40:26 <NamelessCoder> 95% of the iterator condition style VHs did, which is why the parent class is a condition
  • 16:40:33 <BenjaminR> parent::render(); was my hint that it should support them
  • 16:40:44 <BenjaminR> but you know better
  • 16:41:03 <NamelessCoder> O holy source code, we beseech thee!
  • 16:41:15 <NamelessCoder> Tell us the true nature of our being!
  • 16:41:59 <NamelessCoder> it does *not* support then/else in any fashion
  • 16:42:14 <batjony> sorry guys but still can not understand how can I get the next, so currently i get the first page like this: {pageItems->v:iterator.first()->v:variable.set(name: 'pageFirst')} <v:content.render pageUid="{pageFirst.uid}"></v:content.render>
  • 16:42:24 <batjony> how can I get the next one with v:iterator.next
  • 16:42:25 <NamelessCoder> it will only return -1 for "not found" or the object/value at $index+1
  • 16:42:44 <BenjaminR> oh
  • 16:42:48 <BenjaminR> confusing ;)
  • 16:42:55 <NamelessCoder> kind of yeah
  • 16:43:06 <NamelessCoder> nice old FED viewhelper
  • 16:44:53 <BenjaminR> pagination will be the next gist i add to the library :)
  • 16:45:16 <mrboe> hey claus
  • 16:45:24 <mrboe> have you seen my question in the morning
  • 16:45:59 <NamelessCoder> batjony are you *certain* you should not be using v:page.menu.directory or v:page.menu.browse instead? I think you're missing v:page.menu.browse here.
  • 16:46:32 <NamelessCoder> mrboe "NULL" will be treated like a variable reference
  • 16:46:43 <NamelessCoder> {NULL}
  • 16:47:18 <NamelessCoder> you can of course assign that, but what you want is v:condition.variable.isNull
  • 16:47:24 <mrboe> no that was not my question
  • 16:47:25 <mrboe> when i use plugin.tx_fluidbootstraptheme.settings.useTypoScript = 0 and go to page settings and set: settings.position = right the FE uses the value of the Page settings but the BE uses the value wich is set in TS Constants
  • 16:48:03 <NamelessCoder> do you have your own PageController+
  • 16:48:28 <mrboe> https://github.com/bootstraptheme-for-typo3/fluidbootstraptheme
  • 16:48:30 <NamelessCoder> sorry, Provider
  • 16:48:38 <mrboe> i think you made it
  • 16:48:56 <mrboe> its in the fluidboostraptheme
  • 16:49:36 <mrboe> and when im right you create the possibiliy to use TS settings
  • 16:51:13 <NamelessCoder> eh... please debug {settings} in the BE at a place where this happens. It might be missing options added by extended templates or overridden by an array merge internally
  • 16:51:46 <batjony> NamelessCoder: the real example I use to fetch the first page(the default one) https://gist.github.com/momchilgoos/9b579a0653fbe757f05d which my custom content element shows; then I will have links prev/next which will paginate through all pages
  • 16:52:51 <batjony> thats why I am wondering how can I get for example the next - if I have the array {menuItems}
  • 16:53:51 <BenjaminR> batjony - in fces there should be the {page} object available
  • 16:54:26 <BenjaminR> forget what i wrote - i think i didnt get the point
  • 16:54:53 <batjony> i have a custom content element who navigates to pages inside particular sys folder
  • 16:55:28 <batjony> not just navigates, the custom CE actually renders them
  • 16:55:38 <batjony> its some kind of slider
  • 17:00:02 <Guest|9138> hello, somebody tried me to help before, but the answer was not the solution.. my problem:
  • 17:00:13 <NamelessCoder> batjony yes, you need v:page.menu.browse - use that, f:debug {_all} inside the ViewHelper and check which variables you have.
  • 17:00:14 <FT3BOT> ¯\_(ツ)_/¯
  • 17:00:31 <Guest|9138> i need the path (only the path and filename) from <flux:wizard.link activeTab="page"/>
  • 17:01:06 <Guest|9138> with <v:link.typolink doesnt work
  • 17:01:41 <BenjaminR> Guest: a short view to the docs and some intuition said me there is a v:uri.typolink too
  • 17:02:37 <Guest|9138> but what i need for parameter?
  • 17:02:59 <NamelessCoder> Guest|9138 the field's value should then contain exactly the value you need. It depends on what you named the flux:field.* that's the parent of the wizard.
  • 17:03:23 <BenjaminR> NamelessCoder: the value is FILE:XY
  • 17:03:37 <NamelessCoder> if you get a FAL reference from that field's value (again, depends on the configuration of parent field) you can use fal resource viewhelpers to load the resource object
  • 17:03:38 <BenjaminR> onparsed - its a typolink wizard value
  • 17:03:50 <Guest|9138> if i have this: <flux:field.input name="video-webm" label="WebM">
  • 17:03:50 <Guest|9138> <flux:wizard.link activeTab="file"/>
  • 17:03:50 <Guest|9138> </flux:field.input>
  • 17:04:24 <NamelessCoder> http://fluidtypo3.org/viewhelpers/vhs/development/Resource/Record/FalViewHelper.html
  • 17:05:11 <NamelessCoder> I'm not too familiar with the FAL viewhelpers though
  • 17:05:30 <NamelessCoder> first off: your field name is invalid; should not contain dashes
  • 17:05:42 <NamelessCoder> you should prefix it with "settings."
  • 17:07:28 <Guest|9138> dont understand.. testet now with <v:uri.typolink but it doesnt works
  • 17:07:51 <Guest|9138> if my field.input name is video-webm what i need to write in <v:uri.typolink
  • 17:07:54 <Guest|9138> ?
  • 17:11:46 <batjony> NamelessCoder: v:page.menu.browse and f:debug {_all} http://snag.gy/2y6th.jpg
  • 17:11:47 <FT3BOT> ¯\_(ツ)_/¯
  • 17:12:27 <batjony> i do not see any "next"
  • 17:13:28 <Guest|9138> i think i test it tomorrow again, perhaps somebody can help me..
  • 17:13:53 <NamelessCoder> Guest|9138 first rename your field
  • 17:14:14 <NamelessCoder> flux:field.input name="settings.videoWebm" for example
  • 17:15:14 <Guest|9138> ok and then?
  • 17:15:45 <NamelessCoder> second, to *read* the data and assign it: http://fluidtypo3.org/viewhelpers/vhs/development/Resource/FileViewHelper.html combined with http://fluidtypo3.org/viewhelpers/vhs/development/Var/SetViewHelper.html (note: last viewhelper renamed to v:variable.set)
  • 17:16:48 <NamelessCoder> or use as: <v:resources.file ... as="variableName"> {variableName.foobar} </f:resources.file> - you can <f:debug>{variableName}</f:debug> to see properties
  • 17:16:48 <FT3BOT> ¯\_(ツ)_/¯
  • 17:17:04 <NamelessCoder> one of the properties on this object will be your desired file path
  • 17:18:25 <NamelessCoder> to use v:resources.file, pass the value of your field to "identifier" your field name: {settings.videoWebm}. Enable "treadIdAsRerefence="TRUE" to make the ViewHelper load the FAL record as an object reference
  • 17:18:55 <Guest|9138> page links are so easy and only for reading a path is so difficult!!!
  • 17:20:23 <Guest|9138> i test it tomorrow again
  • 17:20:30 <Guest|9138> thank you
  • 17:22:36 <batjony> NamelessCoder: did you look at http://snag.gy/2y6th.jpg - i do not see what variable i can use for next/prev, i see something only for first and last
  • 17:23:37 <NamelessCoder> yw Guest|9138
  • 17:25:55 <NamelessCoder> batjony did you forget to set "pages" attribute on v:page.menu.browse?
  • 17:27:22 <batjony> NamelessCoder: this helper does not have "pages" argument
  • 17:28:06 <batjony> i use it like: <v:page.menu.browse pageUid="{blogSysFolderPageUid}" as="pageItems" doktypes="{blogPageDoktypeId}" deferred="1">
  • 17:30:21 <NamelessCoder> don't mix "as" and "deferred"
  • 17:31:04 <NamelessCoder> other than that, I'm not sure what might be causing the prev/next indices to be empty.
  • 17:31:11 <NamelessCoder> and I have to go
  • 17:32:05 <batjony> k 10x
  • 19:35:21 <bjo3rn> batjony still there?
  • 19:37:10 <bjo3rn> does the menu in your case by any chance only contain 1 element? if so first and last would be the same and no prev/next links added.