This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
58 Posts
SimonD
1 month 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 Book for SEBLOD
822 Posts
Bucklash
1 month 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....

58 Posts
SimonD
25 days 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 VIP membership