Page 1 of 1

Article Custom Fields and Readmore

Posted: Thu Apr 27, 2017 3:12 pm
by Austre
When an article have custom fields and Read More buttom, at Blog Layout those custom fields appear unexpectedly. I did not really expect this, I thought the fields would only appear when full article is shown.

http://migre.me/ww5jI

Re: Article Custom Fields and Readmore

Posted: Thu Apr 27, 2017 3:26 pm
by ranwilli
Just make sure you place the fields AFTER the readmore page break...

Re: Article Custom Fields and Readmore

Posted: Thu Apr 27, 2017 8:10 pm
by Austre
ranwilli wrote:Just make sure you place the fields AFTER the readmore page break...
Got it!

I'm not using the Article Editor to insert Custom Fields, i'm using the field option Automatic Display. When i disable the Automatic Display and insert the Custom Fields by Article Editor, that situation not occurs.

For me the Automatic Display is the best choice cause i have some articles that need a lot of Custom Fields and put one-by-one (about 45 items) with article editor is a pain.

Re: Article Custom Fields and Readmore

Posted: Fri Apr 28, 2017 7:58 pm
by Austre
I learn with my tests, on article editor, when we click at Field Button and list of fields are shown, we can click on Field Group and it makes all Fields of this Field Group to appear at article. This can solve my problem, but Automatic Display would be the best choice.

Re: Article Custom Fields and Readmore

Posted: Wed Sep 05, 2018 8:52 pm
by tvoeten
Austre wrote:
Thu Apr 27, 2017 8:10 pm

I'm not using the Article Editor to insert Custom Fields, i'm using the field option Automatic Display. When i disable the Automatic Display and insert the Custom Fields by Article Editor, that situation not occurs.

For me the Automatic Display is the best choice cause i have some articles that need a lot of Custom Fields and put one-by-one (about 45 items) with article editor is a pain.
Same problem for me. I suggest a core enhancement placing fields in body article instead in intro text under "Read more" button

Re: Article Custom Fields and Readmore

Posted: Thu May 09, 2019 4:33 pm
by DaveOzric
Hello, I found a need to use these for my blog layout and only want the field to show on the blog page but not on the article page.

Is there any way to accomplish this? I was hoping to avoid the intro text method and just set it to show up. Perhaps this is not even an option with an override.

Any ideas?

Re: Article Custom Fields and Readmore

Posted: Fri May 10, 2019 6:14 am
by SharkyKZ
Disable automatic display. Create components/com_content/views/category/tmpl/blog_item.php override. Add this to the override:

Code: Select all

JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

echo FieldsHelper::render('com_content.article', 'fields.render', array('context' => 'com_content.article', 'item' => $this->item));