Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan Skidmore 63 posts 251 karma points c-trib
    Dec 18, 2014 @ 13:22
    Nathan Skidmore
    0

    Predefined categories

    By default Articulate allows the author to create new categories on the fly when they add a new blog post. I want to avoid this and force them to choose from a predefined list. The author can then choose one or more of these categories that are related to their post. This is to make filtering and searching via the categories more straightforward and manageable. The tag feature will still exist for more specific categorization.

    Is there a way to set a fixed list using the current Data Type or do I need to create a new one, such as a Checkbox list?

    Thanks in advance.

    Nathan

     

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Dec 19, 2014 @ 00:19
    Shannon Deminick
    1

    I haven't tried but you might be able to just the tag data type on the categories property to a checkbox list - just depends on how the data is saved (i.e. csv).

    The other problem is that any APIs that articulate uses to query for categories (i.e. TagQuery on the UmbracoHelper) looks in the db tags table (since a category is just a tag). So it depends on your template and it's usage of categories.

    Another option would be to have an event handler on the ContentService.Saving event where you could check if the item being saved is a blog post item, check the categories it contains and remove any non-approved categories.

    Another option would be to create your own property editor that is attributed with the [SupportTags] - this could be a check box list or whatever but would ensure that the tags db table is populated with the values.

  • Nathan Skidmore 63 posts 251 karma points c-trib
    Dec 19, 2014 @ 11:01
    Nathan Skidmore
    0

    Hi Shannon,

    Thanks for the response. I will look to implement option 1. I'll write some custom queries to ensure I don't need to utilize the helper methods for this and will post my outcomes here when I'm done. Cheers.

Please Sign in or register to post replies

Write your reply to:

Draft