@Bruno, that's quite smart =), thanks for that, will have a look if it does what I need!
What I don't understand is that there is already a TV type "resource list" which lists all resources and there are configuration options too, why not just make one which is called "sortby" which accepts a fieldname and defaults to id, I mean there is one "filter" which I don't even needed yet...
EDIT: ok, tried Brunos suggestion, but with no luck...I just get an Array dump into the listbox (single choice)...I added the following to the "Input Options" field:
@EVAL $output = $modx->runSnippet('getResources',array('parents'=>'1,2,3,4,5,6,7,8,12,47','tpl'=>'@INLINE[[+pagetitle]]([[+id]])==[[+id]]','outputSeparator'=>'||','sortby'=>'pagetitle','sortdir'=>'ASC','limit'=>'0')); return 'Resource wählen==||' . $output;
with the purpose to just list all resources =), but alphabethically... any ideas what I'm doing wrong with this?
I'm really at war with those @BINDINGS... I gave up yesterday after 3 hours of trying to achieve, that a simple "text" TV just set's it's default value dynamically (tried with @EVERYTHING...), and it wasn't even complex...I just wanted the field to have the pagetitle of the current resource in it by default, nothing else...but no way...just gave up frustrated, seems like I'm not yet ready for @BINDINGS =)
[ed. note: exside last edited this post 11 years, 5 months ago.]