7

As per the title, how can I add custom fields to the article component?

The tutorial, http://docs.joomla.org/Adding_custom_fields_to_the_article_component almost gets there and it a beautiful piece of work, but relies on a core patch that was never accepted into core.

So I guess I could do that myself, but it means a hack. Or I could install an extension.

Any other ways? What do most people do?

  • 1
    +1 Definitely think this should be turned into a Wiki. There a few answers out there, some good, some bad, but it would be nice to refer back to this whenever someone else asks or for personal future reference. – Lodder Jul 22 '14 at 13:17
  • Check out the Content Construction category on JED, there are some promising extensions. Maybe this or this – Lodder Jul 22 '14 at 13:22
  • You can use this approach: docs.joomla.org/… and save in images for instance. – Peter Lose Jul 22 '14 at 13:27
  • @Peter Lose Sadly that link is only fleshed out for com_contact which will have been been written to support the addition of fields in this simplified way. But thanks for the suggestion - I was only aware that user profiles supported extension using a similar method. Unfortunately com_content doesn't appear to. – Peter Wiseman Jul 22 '14 at 14:24
  • possible duplicate of How to save Custom Fields in Core components – GDP Jul 22 '14 at 14:40
4

The exact steps to do this for #__content are given at this question. The main difference for articles that makes the original tutorial unusuable is that articles do not have the params column, but the attribs column instead.

2

@Peter you can store your custom fields in the images field in the com_content table. Example:

<?xml version="1.0" encoding="utf-8"?>
<form>
  <fields name="images">
    <field name="spacer2" type="spacer" hr="true" />
            <field name="test" type="text" />
  </fields>
</form>
1

I recomend you to use this cck.

http://www.aixeena.org/aixeena-lab/aixeena-easy-cck

It allows to add fields to joomla article in a very non-intrusive way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.