99 Posts
SimonD
6 years ago
2
Topic

Hello everybody,

I'm using a Seblod list field (Seblod form and list pack) in one of my content type (content view).

I would like to display a title before the list but only if this list is not empty.

Any idea?

Thank you

Get a VIP membership
1283 Posts
Bucklash
6 years ago
1
Level 1

Hi

Sounds like a position override might be good.

Have a condition like (have to experiment)

if ($cck->getValue(‘my_field’))
{
echo ‘<div>’.$cck>getValue(‘my_other_field’).’<div>’;
}
<br>

Depending where you are within seblod you have access to:

$cck 

$fields 

$items 

Have to get your head round which is relevant to your context....

99 Posts
SimonD
6 years ago
0
Level 2

Hello Bucklash,

Thank you for your reply.

I could manage what I want with the following in a position override:

if ( $cck->renderField('my_field') != '' )

{ … }

May be it is because list field have not any storage.

Regards

Get a Book for SEBLOD