Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $baseurl = JUri::base();
- $article = JTable::getInstance("content");
- $article_id = JRequest::getVar('id');
- $article->load($articleid);
- $cactid = $article->get('catid');
- JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); //load fields helper
- // incorrect is bellow
- // $fields = FieldsHelper::getFields('com_content.article', $article, true);
- // correct is bellow
- $fields = FieldsHelper::getFields('com_content.article', ['id'=> $article_id]);
- ?>
- <?php foreach ($fields as $field) : ?>
- <?php $value = $field->value;
- echo $value;?>
- <?php endforeach;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement