[Typo3] change order of records in dropdown (BE)

Steven Bagshaw steven.bagshaw at unv.org
Fri Jun 10 10:47:26 CEST 2005


Cool!

I should have mentioned the doco for the TCA is at
http://typo3.org/documentation/document-library/doc_core_api/

Specifically for the "select" type at
http://typo3.org/documentation/document-library/doc_core_api/columns_fieldnam-5/

Steven

"Pieter Jelle" <pieter.jelle at invalid.invalid> wrote in message
news:mailman.1.1118326714.25688.typo3-english at lists.netfielders.de...
> Steven
>
> That was exactly what I was looking for, thanks!
>
> PJ
>
> Steven Bagshaw wrote:
> > Hi Pieter,
> >
> > If I understand correctly what you're trying to do, I think you need to
> > modify the tca.php file for your extension.
> >
> > Find where the columns are specified for "show" and then find the column
you
> > store the location in and modify the foreign_table_where value.
> >
> > Here's an example...
> >
> > "location_id" => Array (
> >             "exclude" => 1,
> >             //snipped
> >                 "foreign_table" => "user_yourextension_location",
> >                 "foreign_table_where" => "ORDER BY
> > user_yourextension_location.name",    // <------- sorting
> >                 "size" => 1,
> > //snipped - etc etc
> >
> > Is this what you wanted?
> >
> > Steve
> >
> > "Pieter Jelle" <pieter.jelle at invalid.invalid> wrote in message
> > news:mailman.1.1118274892.2376.typo3-english at lists.netfielders.de...
> >
> >>Hello all
> >>
> >>I have written an extension which uses a few tables, two of which are
> >>'show' and 'location'. When adding a show in the backend, I can select a
> >>location from the list of available locations. However, that list is not
> >>sorted alphabetically on the field 'name', but sorted on uid. Is there a
> >>way to get this list to show in alphabetical order?
> >>I used kickstarter to lay the foundations for this extension, and I told
> >>Typo3 to sort on the 'name'-field (using "If Manual ordering is not set,
> >>order the table by this field:"), but this does not seem to have any
> >
> > effect.
> >
> >>I have been looking in the source of Typo3 for quite some time now to
> >>find how and where to change this (since I couldn't find a way to
> >>configure this), but to no avail. Any help on how to do this or where to
> >>look would be most welcome.
> >>
> >>Thanks
> >>Pieter Jelle
> >
> >
> >





More information about the TYPO3-english mailing list