[TYPO3-seminars] default-values for element-browser
Kerstin Finke
kerstinfinke at hotmail.com
Mon Jun 7 15:37:57 CEST 2010
Hi Oliver,
thanks very much for your explanations!
Sorry, I did not explain my problem exactly.
The type in my case is not "select", but "group", here's the tca:
'seminar' => array(
'exclude' => 0,
'label' =>
'LLL:EXT:seminars/locallang_db.xml:tx_seminars_attendances.seminar',
'config' => array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_seminars_seminars',
'size' => 1,
'minitems' => 1,
'maxitems' => 1,
),
),
'user' => array(
'exclude' => 0,
'label' =>
'LLL:EXT:seminars/locallang_db.xml:tx_seminars_attendances.user',
'config' => array(
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'fe_users',
'size' => 1,
'minitems' => 1,
'maxitems' => 1,
),
),
What I want now is to set the "allowed"-sysfolder to the default-sysfolder.
Now I found in the documentation the option "MM". Now I think I have to
build a small extension to get a new database for this connection, then
I could set the default-value I want.
This seems to me a bit oversized, since I want to give the
element-browser for "user" one uid only (the sysfolder fe_users).
Or am I wrong?
Greetings
Kerstin
Oliver Hauser | SIVA creative schrieb:
> Hi Kerstin,
>
> this is a general typo3 question...
>
> try to change the tca
>
> bla
> bla
> bla
>
> 'type' => 'select',
> foreign_table' => 'fe_user',
> // here_comes_youre_request - for eaxample:
> 'foreign_table_where' => 'ORDER BY fe_user.title DESC',
> bla
> bla
> bla
>
> The items from "foreign_table" are selected with this WHERE-clause.
>
> The table is joined with the "pages"-table and items are selected only
> from pages where the user has read access! (Not checking DB mount
> limitations!)
>
> Example:
>
> AND [foreign_table].pid=0 ORDER BY [foreign_table].sorting
>
> Markers:
>
> You can use markers in the WHERE clause:
>
> 1.
>
> ###REC_FIELD_[fieldname]###
> 2.
>
> ###THIS_UID### - is current element uid (zero if new).
> 3.
>
> ###CURRENT_PID### - is the current page id (pid of the record).
> 4.
>
> ###STORAGE_PID###
> 5.
>
> ###SITEROOT###
> 6.
>
> ###PAGE_TSCONFIG_ID### - a value you can set from Page TSconfig
> dynamically.
> 7.
>
> ###PAGE_TSCONFIG_IDLIST### - a value you can set from Page
> TSconfig dynamically.
> 8.
>
> ###PAGE_TSCONFIG_STR### - a value you can set from Page TSconfig
> dynamically.
>
> The markers are preprocessed so that the value of CURRENT_PID and
> PAGE_TSCONFIG_ID are always integers (default is zero),
> PAGE_TSCONFIG_IDLIST will always be a commalist of integers (default is
> zero) and PAGE_TSCONFIG_STR will be addslashes'ed before substitution
> (default is blank string).
>
> See documentation:
>
> http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.0.0/view/4/2/
>
>
>
>
> Mit freundlichen Grüßen / with kind regards
>
> Oliver Hauser
>
>
>
> Am 07.06.2010 13:18, schrieb Kerstin Finke:
>> Hi list,
>>
>> when I start a new registration in the backend (list module) I have to
>> select both the Seminar and the Frontend-user by using the
>> element-browsers.
>>
>> I would like to configure the element browser so that I get the right
>> list (of seminars or feusers) without having to browse to it in the
>> page tree.
>> Typo3 always seems to remember the last value, so when I selected the
>> fe-users in the page-tree before, it gives me the right list again
>> when I select the element-browser Frontend-User again. But when I was
>> on the seminars-list before, I have to search my sysfolder fe-users
>> again.
>>
>> I tried to configure this by putting this in the ext_tables.php:
>>
>> $TCA['tx_seminars_attendances']['columns']['user']['config']['default']
>> = 'fe_users';
>>
>> But it does not show any effect.
>> Is there any way to do this?
>>
>> Greetings
>> Kerstin
>> _______________________________________________
>> TYPO3-project-seminars mailing list
>> TYPO3-project-seminars at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-seminars
More information about the TYPO3-project-seminars
mailing list