9 years ago
Topic

Hi, every body !


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
What I have :

- a content type (grid)

- a search/list (grids) with list/item (simple simon)

- a content type (grid group) for the group X which contain an image field and a text field

- I added the group x field (grid_group_x) into my search/list (grids)

- a position override for the item list

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Problem :

- Only the group x field is not showing, the other fields are ok

- If I disable my position override of the list/item the group X is working correctly... which means that the problem is really in the position override of my search/list

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The syntaxe to call the group x in my position override of simplesimon:

<?php $cck->renderField( 'grid_group_x' );?>



Maybe is the syntaxe incorrect?

an idea?

Thanks a lot seblod forum!

Get a VIP membership
9 years ago
0
Level 1

Hi,

Can you try this to check you have something in your field :

<?php echo $cck->getValue('grid_group_x' ); ?>

Olivier

9 years ago
3
Level 1

Hi Olivier, 

thanks for your answer, but this peace of code is not working, its only display "array"

but I found a solution! : 

<?php foreach($cck->get( 'grid_group_x' )->value as $gx){ ?>
<img src="/<?php echo $gx['grid_group_image']->value; ?>" />
<?php } ?>

I don't know why it's not working with the others syntaxe...

Thanks again

9 years ago
2
Level 2

Do you know why it's not working with the other syntaxte? template problem?

;-)

tx

572 Posts
_jrmo
9 years ago
1
Level 3

Hi there!

In your initial post, you put:

<?php $cck->renderField( 'grid_group_x' );?>

but it should be

<?php echo $cck->renderField( 'grid_group_x' );?>

You are missing the "echo".

_jrmo

9 years ago
0
Level 4

Hi thanks for your answer!

Sorry for missing the echo arrrgh, I copy pass this syntaxte directly from the doc... but its for typo if I not wrong... anyway..

Ok it's working, but not immediately... and I know why

My list is wrap my list (owl carousel) and it add a display:none to it when I use your synthaxe..., but with the other one (foreach...), it was ok, that it!

nb: with getValue i could'nt make it work, maybe it's normal with groupx?

Thanks a lot james

Djidj

Get a Book for SEBLOD