10 years ago
5
Topic

Hi. How I can display Category Name in a custom template? In Seblod: (JForm - Category), selecting  many categories. I try this in a custom template: <?php echo $cck->get('art_catid')->title; ?> but doesn't work. How should I proceed?

Get a VIP membership
10 years ago
0
Level 1

Anyone know?

10 years ago
1
Level 1

Hi Raposa,

Yes, you should use:

echo $cck->getText('art_catid');
echo $cck->get('art_catid')->text;

Regards,
Saba.

10 years ago
0
Level 2

Thank you Saba!

10 years ago
1
Level 1

What syntax would you use for a custom field? I have a field called start_date and I'm having a hard time getting it to show up.

10 years ago
0
Level 2

Hello zuber,

depending on how you want to display the date field, you can use

echo $cck->renderField(start_date);

or

echo $cck->getValue(start_date);

The display of dates sometimes is a little tricky, depending on the usecase.

To display the date in a custom format, see my post here.


A good starting point for custom templating is in V2 documentation here.

Get a VIP membership