November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Oh and i forgot to note - I also had events that would trigger rebuilds of the taxonomy cache when items are changed/published/etc.
Use Episerver categories is the easiest approach combined with custom validation of page and setting of default values.
Or use selection factories like you have done and use Episerver find and facets for instance.
Hi, Timothy,
I also think your approach is fine. I would most probably avoid categories, since they are a bit limited (maintaining them requires admin access) and are painful in terms of translations (they could be a good choice for a single-language websites).
The string taxonomies, you could have saved them as pages/blocks (if you already haven't, I am not sure how you CRUD these strings), since that would give editors the possibility to maintain them as a part of interface - giving you the rest of the features: translations, publishing, hooking to events. You can take a look at this video that gives some ideas: https://www.youtube.com/watch?v=QRcLl2hpzsA
BR,
Marija
I like the idea of saving them as blocks for easy editor management - I had done something similar with a different type of content and thought it might be a good idea. I think I'd probably search the data in Find as well like Daniel suggested rather than cache it. Thanks for the feedback guys, I'll keep it in mind on my next build.
I'm looking for a little input on how others have approached this problem I had on a recent build (one I think is somewhat common).
For my project I had seven seperate taxonomy categories that applied to multiple types of content, all with their own unique field values. Some taxonomys affected multiple page types, others a single type. for example:
Taxonomy 1: applies to regular content page type.
Select one
(a,b,c)
Taxonomy 2: applies to regular content page type and article page type.
Select Many
(a,b,c,d,e,f,g)
Taxonomy 3: applies to article page type and product page type.
Select One:
(a,b,c,d)
What I ended up doing is creating an interface for each taxonomy type, and a selection factory with the choices for each taxonomy. I'd then apply the taxonomies to each page type using those interfaces. The interface was very simple, just a string field for the taxonomy field. I would then apply SelectOne or SelectMany attribute. Basically I'd run a scheduled job that would crawl the site and load all of this information into a simple cache for querying, basically just the name of the item, its content ID and what it was tagged with. Heres a quick example of some code, obfuscated with (Taxonomy Name) wherever a specific taxonomy name was used:
Heres an interface example:
heres an example of the field added to a content type:
and lastly one of the selection factories: