Discussion:
[TYPO3-english] View label when using multiple records in the list view
Guillermo R. Oramas J.
2011-06-23 20:49:06 UTC
Permalink
Hello.

I'm sorry if the subject of the message is not to clear.

The situation is that I made a custom plugin to storage organizations.

I have a field Geographical Scope that look up in two tables: Regions
and Countries. I used a group db field type for that. Here is the TCA
for the field:

'carea' => array (
'exclude' => 1,
'label' => 'LLL:EXT:ori_org/locallang_db.xml:tx_oriorg_pt.carea',
'config' => array (
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_oriorg_regions,tx_oriorg_countries',
'size' => 1,
'minitems' => 1,
'maxitems' => 1,
)
),

When I look in the List module I see the relation: tx_oriorg_regions_2
but not the name of the country or region.

When the relation is using MM tables it shows the number of the
relations but not the names.

With select type is posible, but I can't use many tables or open the
Page Tree Navigator.

There is a trick to display names instead of relations?

Thanks.

Memo.
Jigal van Hemert
2011-06-23 21:14:00 UTC
Permalink
Hi,
'carea' => array (
'exclude' => 1,
'label' => 'LLL:EXT:ori_org/locallang_db.xml:tx_oriorg_pt.carea',
I guess you mean 'title' => '......', here?
label "Points to the fieldname of the table which should be used as the
"title" when the record is displayed in the system."
'config' => array (
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_oriorg_regions,tx_oriorg_countries',
'size' => 1,
'minitems' => 1,
'maxitems' => 1,
)
),
When I look in the List module I see the relation: tx_oriorg_regions_2
but not the name of the country or region.
Perhaps you've mis-configured the label for the tx_oriorg_regions and
tx_oriorg_countries tables too?

See:
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2517078
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Guillermo R. Oramas J.
2011-06-23 21:26:54 UTC
Permalink
Hi, thank you for the answer.

There is not 'title' for columns in the TCA documentation. I think the
TCA setup is good.

My point is that when I use "select" type and link to foreign tables,
the list view displays the labels of the columns, but when I use
"group" type the list view displays tx_oriorg_regions or a number (in
mm relations).
Post by Jigal van Hemert
Hi,
? ? ? ? ? ? ? ?'carea' => ?array (
? ? ? ? ? ? ? ? ? ? ? ?'exclude' => ?1,
? ? ? ? ? ? ? ? ? ? ? ?'label' =>
?'LLL:EXT:ori_org/locallang_db.xml:tx_oriorg_pt.carea',
I guess you mean 'title' => '......', here?
label "Points to the fieldname of the table which should be used as the
"title" when the record is displayed in the system."
? ? ? ? ? ? ? ? ? ? ? ?'config' => ?array (
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'type' => ?'group',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'internal_type' => ?'db',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'allowed' =>
?'tx_oriorg_regions,tx_oriorg_countries',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'size' => ?1,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'minitems' => ?1,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'maxitems' => ?1,
? ? ? ? ? ? ? ? ? ? ? ?)
? ? ? ? ? ? ? ?),
When I look in the List module I see the relation: tx_oriorg_regions_2
but not the name of the country or region.
Perhaps you've mis-configured the label for the tx_oriorg_regions and
tx_oriorg_countries tables too?
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2517078
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Jigal van Hemert
2011-06-24 12:02:55 UTC
Permalink
Hi,
Post by Guillermo R. Oramas J.
There is not 'title' for columns in the TCA documentation. I think the
TCA setup is good.
Sorry, I was confused by the 'title' property of the table. You're of
course right.

The only thing I can think of is that the tables you link to do not have
the 'label' (not the label of the column, but of the entire table; yes
very confusing) field set correctly.
This doesn't explain why an mm-relation would work correctly though.

What you describe is not standard/correct behaviour. I use db relations
a lot and haven't seen the behaviour you describe.
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Guillermo R. Oramas J.
2011-06-24 13:26:55 UTC
Permalink
Hi Jigal.

I don't know what are you talking about table label. Could you explain
it?. Maybe there is the problem.

When I use select type the column label is used to display the content
of the field, but when I use group type something like tx_table or an
integer is displayed. It is logical since if the record has multiple
relations, doesn't has sense to display a list of all relations, but I
use group only to select one record from multiple tables and it would
be ideal to show the label field instead of the relation that is
stored in the referring table.

I want to show for example "To Review" of the referred table and not
"tx_states_3" of the referring table.

Thanks for help.
Hi,
Post by Guillermo R. Oramas J.
There is not 'title' for columns in the TCA documentation. I think the
TCA setup is good.
Sorry, I was confused by the 'title' property of the table. You're of course
right.
The only thing I can think of is that the tables you link to do not have the
'label' (not the label of the column, but of the entire table; yes very
confusing) field set correctly.
This doesn't explain why an mm-relation would work correctly though.
What you describe is not standard/correct behaviour. I use db relations a
lot and haven't seen the behaviour you describe.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Guillermo R. Oramas J.
2011-06-26 00:32:19 UTC
Permalink
It is unfortunate that nobody could help me with this.

Now I'm developing the frontend plugin to display the results of the tables
and the behavior is identical.

I think the problem is based in the use of the pi_exec_query method of the
tslib_pibase class that returns the fields in a plain way of the referring
table with no search in the referred table.

This method has an $mm_cat parameter that I don't know well how to use.

I'm going to explore about this or make my custom method. But, maybe there
is another core method to build relational queries. Any idea?

Thanks a lot.

-----Mensaje original-----
De: typo3-english-bounces at lists.typo3.org
[mailto:typo3-english-bounces at lists.typo3.org] En nombre de Guillermo R.
Oramas J.
Enviado el: Viernes, 24 de Junio de 2011 08:27
Para: TYPO3 English
Asunto: Re: [TYPO3-english] View label when using multiple records in the
list view

Hi Jigal.

I don't know what are you talking about table label. Could you explain it?.
Maybe there is the problem.

When I use select type the column label is used to display the content of
the field, but when I use group type something like tx_table or an integer
is displayed. It is logical since if the record has multiple relations,
doesn't has sense to display a list of all relations, but I use group only
to select one record from multiple tables and it would be ideal to show the
label field instead of the relation that is stored in the referring table.

I want to show for example "To Review" of the referred table and not
"tx_states_3" of the referring table.

Thanks for help.
Post by Jigal van Hemert
Hi,
Post by Guillermo R. Oramas J.
There is not 'title' for columns in the TCA documentation. I think
the TCA setup is good.
Sorry, I was confused by the 'title' property of the table. You're of
course right.
The only thing I can think of is that the tables you link to do not
have the 'label' (not the label of the column, but of the entire
table; yes very
confusing) field set correctly.
This doesn't explain why an mm-relation would work correctly though.
What you describe is not standard/correct behaviour. I use db
relations a lot and haven't seen the behaviour you describe.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Jigal van Hemert
2011-06-26 15:25:23 UTC
Permalink
Hi,
Post by Guillermo R. Oramas J.
I don't know what are you talking about table label. Could you explain
it?. Maybe there is the problem.
I was referring to the TCA of the tables you link to in the carea field;
tx_oriorg_regions, tx_oriorg_countries.

Can you give the TCA of those tables?
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Guillermo R. Oramas J.
2011-07-03 18:45:44 UTC
Permalink
Sure! Thanks Jigal.

This is the TCA of tx_oriorg_regions. The other table is similar to this.

$TCA['tx_oriorg_regions'] = array (
'ctrl' => $TCA['tx_oriorg_regions ']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'hidden,nombre_en,nombre_es'
),
'feInterface' => $TCA['tx_oriorg_regions']['feInterface'],
'columns' => array (
'hidden' => array (
'exclude' => 1,
'label' =>
'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => array (
'type' => 'check',
'default' => '0'
)
),
'nombre_en' => array (
'exclude' => 1,
'label' =>
'LLL:EXT:ori_tablas_comunes/locallang_db.xml: tx_oriorg_regions.nombre_en',

'config' => array (
'type' => 'input',
'size' => '30',
'max' => '50',
'eval' => 'required,trim',
)
),
'nombre_es' => array (
'exclude' => 1,
'label' =>
'LLL:EXT:ori_tablas_comunes/locallang_db.xml: tx_oriorg_regions.nombre_es',

'config' => array (
'type' => 'input',
'size' => '30',
'max' => '50',
'eval' => 'required,trim',
)
),
),
'types' => array (
'0' => array('showitem' => 'hidden;;1;;1-1-1, nombre_en,
nombre_es')
),
'palettes' => array (
'1' => array('showitem' => '')
)
);

And this is in the ext_tables.php file:

$TCA['tx_oriorg_regions'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:ori_tablas_comunes/locallang_db.xml:
tx_oriorg_regions',
'label' => 'nombre_es',
'rootLevel' => 1,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY nombre_es',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' =>
t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' =>
t3lib_extMgm::extRelPath($_EXTKEY).'icon_ tx_oriorg_regions.gif',
),
);



-----Mensaje original-----
De: typo3-english-bounces at lists.typo3.org
[mailto:typo3-english-bounces at lists.typo3.org] En nombre de Jigal van Hemert
Enviado el: Domingo, 26 de Junio de 2011 10:25
Para: typo3-english at lists.typo3.org
Asunto: Re: [TYPO3-english] View label when using multiple records in the
list view

Hi,
Post by Guillermo R. Oramas J.
I don't know what are you talking about table label. Could you explain
it?. Maybe there is the problem.
I was referring to the TCA of the tables you link to in the carea field;
tx_oriorg_regions, tx_oriorg_countries.

Can you give the TCA of those tables?

--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Jigal van Hemert
2011-07-07 15:48:17 UTC
Permalink
Hi,
Post by Guillermo R. Oramas J.
This is the TCA of tx_oriorg_regions. The other table is similar to this.
Although your case does not use label_alt, the issue in forge [1] also
reports that for normal labels it sometimes doesn't work.

All I can say about your settings are that they look okay. I fear that
it requires more digging to find the root of the problem.

[1] http://forge.typo3.org/issues/24317
--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
Loading...