Custom Field Joomla Article On Addon Articles_scroller - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Custom Field Joomla Article On Addon Articles_scroller

E8

Easy Connect 83

SP Page Builder 2 years ago

Hello, Can you tell me how to insert a custom field of a Joomla article in the articles list of the articles_scroller addon via the site.php view?

I saw this instruction in the site.php file of the addon articles but it does not work I have this error: trim(): Argument #1 ($string) must be of type string, array given

with this code for Joomla 4:

JLoader::registerAlias('FieldsHelper', 'Joomla\Component\Fields\Administrator\Helper\FieldsHelper');

$custom_fields = FieldsHelper::getFields('com_content.article',$item);

$output .= FieldsHelper::render( 'com_content.article', 'fields.render', array( 'context' => 'com_content.article', 'item' => $item, 'fields' => $custom_fields, ) );

Thanks

0
2 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #112605

Hi there,

I appreciate you reaching out. Do you want to apply the custom field inside the addon? If yes, this feature is not ready.

-Thanks

0
E8
Easy Connect 83
Accepted Answer
2 years ago #112665

Yes that's right. I know it's not officially possible yet, however, can you give me a procedure to follow by taking inspiration from the addon articles. Thanks

0