Block without properties but using Categories

Vote:
 

We created a block that uses the built-in Page/Block Categories in CMS to determine which blog article thumbnails to show in a preview carousel.  It is very automated and just needs to be dropped into the desired Content Areas with no other Admin input, works great.  With one hitch.

We do not need any additional properties we just want the Categories so we do need a model, but

  1. the categories do not show on a new addition within the content area controls
  2. "save" is disabled until something is added as a property on a new addition within the content area controls

We are considering adding a dummy property, but seems like there is probably a better way.

I found this legacy article that pretty much answers it, but we need the model: https://world.episerver.com/forum/legacy-forums/Episerver-7-CMS/Thread-Container/2013/6/Block-without-properties/

#249225
Feb 25, 2021 16:20
Vote:
 

This may be an off the cuff idea but I've checked on if this seems to work using Geta Categories https://github.com/Geta/EpiCategories which is a replacement package for the in-built category system allowing categories to be managed in the edit area instead of admin with a standard content editing API. I guess it depends if you use categories heavily already or this is a new use.

In this package the category field is a separate fileld and can be marked as [Required] so should support your requirements.

#249230
Feb 25, 2021 17:05
Vote:
 

Thanks Scott, Categories is heavily used on this site already.  But that is an inteersting thought for future projects.

Still seems like an Epi bug not to be able to see the categories on that pop-over at the very least.

#249231
Feb 25, 2021 17:39
Vote:
 

By the pop over, are you referring to the create window or are you using the quick edit feature in either BlockEnhancements labs package or the later CMS release.

#249233
Feb 25, 2021 17:41
Vote:
 

The the create window on a recent version of CMS (we recently updated to 11.20.3), the one showing in the screenshot above, if it shows for you.

#249235
Feb 25, 2021 19:24
Vote:
 

Yes, just checking. That's something that's been in the blockenhancement package for a while and just been added to CMS core

#249236
Feb 25, 2021 19:26
Vote:
 

To close out this topic, I ended up creating a property to determine how may thumbnails to show.  It was not required and could have been hard coded as we always want the same number.  Ironically I setup a default for the property for the value we wanted.  But that did not work either because the enabling of the Save button required a change in a control.  So if the pop-over screen had the right value, you still could not save and close the window.

Its definitly a use case that Episerver did not consider and should be a quick bug fix.

#249962
Mar 12, 2021 12:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.