9 Posts
Ediconcept
8 years ago
Topic

Hi, 

I have a Group X field in my content type and $cck->getValue('field_name') doesn't seem to work when I use it on the typography. I try to use it as well in the child content type of my Group X field, and it doesn't work.

So, when I use a Groups X field, how can I use the value of another field of this group in the typography of a field ?

thanks

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

value is an array, so you need to use special syntax - number on second palce here is index (0 = 1st group, 1 = second group etc)

$cck->getValue( 'groupx_fieldname', 0, 'fieldname' );
	
$cck->getTypo( 'groupx_fieldname', 1, 'fieldname' );

https://www.seblod.com/resources/extensions/plug-ins/group-x-field

8 years ago
0
Level 2

Hi Klas,

seems to be that this is not correct notation. Must be:

$cck->getValue( 'groupx_fieldname, 0, fieldname' );
$cck->getTypo( 'groupx_fieldname, 1, fieldname' );

My test with typo HTML gives a result. If use ' between the commata only the code return.

Get a VIP membership