Copied to clipboard

Flag this post as spam?

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


  • Peter Cort Larsen 421 posts 1038 karma points
    Oct 29, 2020 @ 16:13
    Peter Cort Larsen
    0

    New category

    Hi,

    I am trying to add a new category. I am using a slightly changed version of your example.cs.

    So far i have done this, but it dosnt show up in ' Perplex.ContentBlocks.Constants.Categories.' i still only see Headers and Content. enter image description here

  • Daniël Knippers 153 posts 1117 karma points MVP 2x c-trib
    Oct 30, 2020 @ 07:10
    Daniël Knippers
    0

    Blocks are assigned to categories (via IContentBlockDefinition.CategoryIds), and I assume categories without any blocks will not appear in the backoffice. So if you add the id of that new category to one of the block definitions it should work.

  • Peter Cort Larsen 421 posts 1038 karma points
    Oct 30, 2020 @ 07:17
    Peter Cort Larsen
    0

    Hi,

    Yes, but i cant choose my new Category. Must be missing something.

    enter image description here

  • Daniël Knippers 153 posts 1117 karma points MVP 2x c-trib
    Oct 30, 2020 @ 07:19
    Daniël Knippers
    100

    Well obviously ContentBlocks does not have a constant that belongs to your new category :-) Those are simply the GUIDs of the builtin categories. Our code cannot contain a compile time constant for a category that was added on runtime. Just put the id (the Guid) there of the category you just created.

  • Peter Cort Larsen 421 posts 1038 karma points
    Oct 30, 2020 @ 07:23
    Peter Cort Larsen
    0

    Yes, got it, thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies