Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1635

Administration Joomla! 5.x • Re: Cannot add custom field to category

$
0
0
I can create Custom Fields for Categories, display then in the Category edit form and add data to it.
However I cannot display those Custom Fields on the front-end.
Maybe you can only do so with template overrides?


Creating Custom Fields for Categories

In Content > Field Groups > dropdown "Category", I created a new Field Group for Category: "Category Field Group":
Screenshot from 2024-12-18 08-47-38.png
In Content > Field > dropdown "Category", I created a Custom Field for Category: "Category Custom Field" and assigned it to All categories and to the Field Group "Category Field Group":
Screenshot from 2024-12-18 08-48-43.png
In the Content > Categories, I created a new Category: "Some Category"
and I added "test with this Category Custom Field" to that Custom Category Field:
Screenshot from 2024-12-18 08-49-25.png

Creating Custom Fields for Articles

For the Articles I also created a Field Group called "Articles Field Group" and a Field called "Articles Custom Field"
In the Content > Articles, I created a new Article: "Test article" and I assigned it to the "Some Category" category.
And I added something to the Custom Article Field.

I created a Menu Item of type Category Blog to display that category in the front-end menu.
In the default Cassiopeia template, the Custom Article Field is displayed, but the Custom Category Field not.
I don't know if this option to display Custom Fields for Categories, or if I need to configure something else to display it...
Screenshot from 2024-12-18 09-12-19.png

Custom Fields in the database

However, the creation of Custom Category Fields works ok. Both the Fields and the Field Values are stored in the database. The Fields:
Screenshot from 2024-12-18 09-26-22.png
The Field Values:
Screenshot from 2024-12-18 09-25-52.png

Displaying Custom Fields in a 3rd party template

And in YOOtheme Pro (commercial template builder), I can create a view that displays the Custom Category Field:
Screenshot from 2024-12-18 09-20-31.png

Statistics: Posted by pe7er — Wed Dec 18, 2024 8:33 am



Viewing all articles
Browse latest Browse all 1635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>