ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom Category Fields Question: What Are They For?

September 27, 2007 1:12am

Subscribe [5]
  • #1 / Sep 27, 2007 1:12am

    When I saw the new feature that Category Groups can have custom fields, I thought, “great, now I can reduce the number of sections (weblogs) I have by encapsulating all the weblogs I have for news, articles, etc. for each artist I’m covering. However, on the Publish page, I go to the Categories tab, and choose my category, but the custom fields don’t show up - I don’t think I’m understanding the Custom Category Fields’ purpose.

    For example, I wanted to set up a site like this:

    Main (all artists covered together) (weblog)
    |
    |—News (category group)
    |  |—News Body (category group custom field)
    |  |—News (category)
    |  |—Artist 1 News (category)
    |  |—Artist 2 News (category)
    |  |—Artist 3 News (category)
    |
    Artist 1 (weblog)
    |
    |—News (category group)
    |  |—Artist 1 News (category)
    |
    Artist 2 (weblog)
    |
    |—News (category group)
    |  |—Artist 2 News (category)
    |
    Artist 3 (weblog)

    ...and so on, with each Category Custom Field showing when the category was changed on the Publish page. I thought they would show up on the Publish page when the appropriate category was chosen and the relevant custom fields would appear in place of the default fields for that weblog.

    Can anyone explain Custom Category Fields and what their purpose is? Much appreciated.

  • #2 / Sep 27, 2007 1:20am

    Lisa Wess

    20502 posts

    Ah, no, you are misunderstanding.  Custom category fields allow you to have extra fields for your categories - to describe them or have alternate content.  Have a look at this thread as well as the link Derek provides for some useful examples of how this could be used.

  • #3 / Oct 10, 2007 2:00am

    Joyrex

    28 posts

    I too am a bit lost on what I could use Category Custom Fields for - I read the what Derek said about them (the whole States as Categories, and having State Bird as a Custom Category Field) - but where would one of my editors enter this metadata for that CCF (custom category field), and more importantly, how would it be used on the Publish or Edit pages? I’ll assume it shows to the end user if it’s included into the templates just like any category, but how does it play a role in publishing or organizing data?

    Thanks to anyone who can perhaps provide some more examples and how they work, so I can stop feeling so thick!

  • #4 / Oct 10, 2007 2:02am

    Lisa Wess

    20502 posts

    You would see up the custom category fields, then when editing any given category, the created fields show up in that form to be filled out. So you would need to allow your users permission to edit categories.

    Custom category fields do not play a role in publishing or organizing data by default; though you could certainly use conditionals on the public templates towards that purpose - but in the CP, they are just fields you fill out.

  • #5 / Oct 10, 2007 11:13am

    Joyrex

    28 posts

    Ah, so the only time the CCF come into play is when you’re editing categories, so it can be said they are for internal use only, and not actually displayed on the site?

  • #6 / Oct 10, 2007 11:39am

    Boyink!

    5011 posts

    No - they can be displayed on the site as well.

  • #7 / Oct 10, 2007 12:47pm

    Joyrex

    28 posts

    OK, now I am confused again - can someone give me a practical example (besides Derek’s) and explain the workflow of how CCFs are used? Sorry for being so thick about this, but I really want to leverage as many of EE’s features as possible and understand them.

  • #8 / Oct 10, 2007 12:51pm

    Robin Sowell

    13255 posts

    I’m not using them yet, but I plan to with a multi-lingual site.  Have a field for each language and put the cat name in it, language appropriate.  But in general?  It was added because a lot of folks requested more fields for categories- so the crew effectively gave them as many fields as they want.  For example- you might want to display ads or something- a different add based on which category page you’re on.  One thing you could do is stick them in a custom category field.  Other ways to get that result- but that’s an option.  Pretty much anything you might want associated with a particular category would fit the bill.

  • #9 / Oct 10, 2007 12:57pm

    Boyink!

    5011 posts

    OK - here on my tutorial series project site the Products page is listing categories. 

    Currently it’s title, description.  Simple enough with default fields.

    What if this were a distributor and each category had a different phone number to call?  Or a different person to speak to?  Or a large photo for this page, but a smaller/different photo on the yet-to-be-built category pages?

    All of those could be added with custom category fields.

    Not sure what you mean by workflow - for me usually I do the initial setup of categories while building the site, with clients maybe changing descriptions etc down the road.  The interface still needs a proper “file upload” function for the image (hint hint) before it’s really “client friendly”.

  • #10 / Oct 10, 2007 1:20pm

    Joyrex

    28 posts

    Ah, OK - so like in the Distributor example, if my editors had to add alternate phone numbers to a particular Distributor (who is a category), they wold edit the category and have access to the CCF to add that new phone number in, and on my Distributors page that my end-users see, I could display that CCF and the updated phone number would show up, right?

  • #11 / Oct 10, 2007 1:22pm

    Lisa Wess

    20502 posts

    May I make a suggestion?

    There are hundreds of features in ExpressionEngine that I don’t use on most of my sites; you don’t need to use all features - if you can not think of a way this would be helpful to you, then perhaps it is not something to concern yourself with?  If at some point you need more data about a category, or are trying to solve a particular issue about categories, that may be a better time to revisit and see if this feature is the answer. =)

  • #12 / Oct 10, 2007 1:25pm

    Boyink!

    5011 posts

    Ah, OK - so like in the Distributor example, if my editors had to add alternate phone numbers to a particular Distributor (who is a category), they wold edit the category and have access to the CCF to add that new phone number in, and on my Distributors page that my end-users see, I could display that CCF and the updated phone number would show up, right?

    As long as you’ve added a custom field to hold that number, and added the field to your category template— then yes.

    Lisa - I agree with your suggestion, but sometimes the best way to decide to not use a particular feature is to understand what it brings to the table.

  • #13 / Oct 10, 2007 2:34pm

    Joyrex

    28 posts

    Lisa,

    Yeah, I considered using an example relevant to me to see if it fit my needs, but I wanted to understand what the thought process behind implementing such a feature was, and how people have leveraged it to their advantage. In my case, I have a discography, and each release can potentially be on multiple record labels, so I needed a way my end users could add new record labels and then associate the release with the label, and add a new label if it didn’t exist in the database already. Right now, I have a category called Record Label, and had thought of adding a sub-category every time a new record label was needed to the Record Label parent category. I think adding a custom category field to the Record Label category will be the best way to go.

    Thanks to both you and Michael for clarifying things, and it’s again a testament to the excellent community and excellent product that is ExpressionEngine.

  • #14 / Oct 12, 2007 3:19pm

    openmotive

    65 posts

    Does anyone know if there is an easy way, from the context of an individual entry (not a category list or archive), to output the value of custom category fields?

    Basically, we want to use a custom drop down at the category (Used for site section/subsection) level to assign a specific sidebar to all pages assigned to a category but we’ve been unable to determine how to access the custom field value from within the context of an individual page.

  • #15 / Oct 12, 2007 3:24pm

    Lisa Wess

    20502 posts

    Is this within the context of the weblog entries tag? If so, as long as it is also inside {categories} then your fields area available.  See these docs.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases