Article Custom Fields and Readmore

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
Austre
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Mon Nov 05, 2012 12:47 pm

Article Custom Fields and Readmore

Post by Austre » Thu Apr 27, 2017 3:12 pm

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

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: Article Custom Fields and Readmore

Post by ranwilli » Thu Apr 27, 2017 3:26 pm

Just make sure you place the fields AFTER the readmore page break...
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

Austre
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Mon Nov 05, 2012 12:47 pm

Re: Article Custom Fields and Readmore

Post by Austre » Thu Apr 27, 2017 8:10 pm

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.

Austre
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Mon Nov 05, 2012 12:47 pm

Re: Article Custom Fields and Readmore

Post by Austre » Fri Apr 28, 2017 7:58 pm

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.

User avatar
tvoeten
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Thu Aug 18, 2005 8:38 am
Location: Eindhoven, Netherlands

Re: Article Custom Fields and Readmore

Post by tvoeten » Wed Sep 05, 2018 8:52 pm

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

User avatar
DaveOzric
Joomla! Ace
Joomla! Ace
Posts: 1591
Joined: Sat May 22, 2010 10:29 pm
Contact:

Re: Article Custom Fields and Readmore

Post by DaveOzric » Thu May 09, 2019 4:33 pm

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?

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2906
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Article Custom Fields and Readmore

Post by SharkyKZ » Fri May 10, 2019 6:14 am

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));


Locked

Return to “General Questions/New to Joomla! 3.x”