98 Posts
Edwin
11 years ago
2
Topic

Hello all

I have a strange problem. I'm creating a series of websites, all sharing the same joomla and seblod and templates versions. On the first website, fieldx image gallery worked 100%. On site 2, images upload but won't show in frontend content and lists when I use custom template. I can see images in content admin in backend.

In my custom template I am using <img src="/<?php echo $cck->get('portfolio_image_fieldx')->value; ?>" alt="<?php echo $cck->get('user_name')->value; ?>" title="<?php echo $cck->get('user_name')->value; ?>">. When I use "renderField" tag it works. But I need "get" tag for what I'm doing.

Why does it work on the one site and not the other? The list and content templates were from site 1, just zipped and installed on site 2. Fields also have identical settings. Any help or insight would be much appreciated.

Get a VIP membership
151 Posts
pixelpixel
11 years ago
1
Level 1

Hi Edwin,


i guess for fieldx you need a "foreach"-construct, if you want to use the get-method. Please look at the v2-docu:

Calling FieldX and GroupX


kind regards

98 Posts
Edwin
11 years ago
0
Level 2

Hi pixelneco

Thanx. I got it working, eventually. I used the code below and it works:


<img src="/<?php echo $item->get('fieldx_fieldname')->value[1]->thumb2; ?>" alt="<?php echo $item->get('name')->value; ?> title="<?php echo $item->get('name')->value; ?>" />

Get a VIP membership