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.

categories, required

February 29, 2008 8:03pm

Subscribe [3]
  • #1 / Feb 29, 2008 8:03pm

    Erdal Demirtas

    84 posts

    Hi,

    is ist possible to make “categories” required?
    (at least one category should be selected, so that an entry can be saved)

    Thanks!

  • #2 / Feb 29, 2008 8:34pm

    Derek Jones

    7561 posts

    No, but what many people do is create a category named “Uncategorized”, make it the weblog’s default category, and exclude it from display on the front end.  It then makes it very easy for content publishers to filter in the Edit section to find any articles that were not properly assigned categories.  If you’re okay with PHP, then you could also handle this with an extension, so it wouldn’t allow you to publish if a valid category was not selected.  Or publish via an SAEF where you could control the category input, add some javascript validation if you wish, etc.

  • #3 / Feb 29, 2008 8:39pm

    Erdal Demirtas

    84 posts

    I think my problem is solved.

    Maybe the categories can not be made required, but it can be easily found which entries have no categories.

    CP Home ›  Edit ›  Edit Weblog Entries
    In this page after selecting the related weblog, select “none” in the “Filter by Category” dropdown and press search.
    The result is the entries without categories.
    This is enough for me!

  • #4 / Feb 29, 2008 8:41pm

    Erdal Demirtas

    84 posts

    Hi Derek,

    You were faster 😊
    Thank you for the answer!
    I will think about it.

    Are the things which I explained in my previous message correct?

    Thanks!

  • #5 / Feb 29, 2008 8:50pm

    Derek Jones

    7561 posts

    Yes, the difference is whether or not you wish uncategorized entries to be published to the site.  Using category=“not 1” is much more convenient than listing all categories that you do wish to display.

  • #6 / Feb 29, 2008 9:16pm

    Erdal Demirtas

    84 posts

    I think your suggestion is cleaner.

    I will have in both cases no problem, because I will always use a category (company type in my case).
    For example: category=“2” or category=“2|4”

    I also read that the parameter [uncategorized_entries=“n”] should be used, if “not” is used for the category selection. Example: category=“not 3|5”. So if I do not have a category named uncategorized, all the entries which are not categorized will be also displayed. If I have an uncategorized category (id=1) as you suggest, I should use: category=“not 1|3|5”, to display all the entries which do not belong to categories 1, 3, and 5.

    Thanks for the help!

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

ExpressionEngine News!

#eecms, #events, #releases