Articulate
Articulate copied to clipboard
Articulate v5: GetAllCategories - not available anymore as UmbracoHelper extension?!
In my blog based on Articulate 4.3.2 I used a call to "Umbraco.GetAllCategories(Articulate.Models.IMasterModel)Model)" to get a list of all my blog categories, and displayed these in my custom theme in my CategoryListWidget.cshtml.
Now in v5 this method "GetAllCategories" is only available in the ArticulateTagRepository (https://github.com/Shazwazza/Articulate/blob/develop/src/Articulate/Services/ArticulateTagRepository.cs#L42)
I tried to inject the repository in the view:
@inject IArticulateTagRepository articulateTagRepository;
But then I get the error:
InvalidOperationException: Cannot run a repository without an ambient scope.
Is there a way to get this working in v5?
@wvdweerd in v5 can you still access the list of categories by going to /blog/categories/
Feel free to create a PR to add the method to the ArticulateTagService to call the repository method.
@khraibani
@wvdweerd in v5 can you still access the list of categories by going to /blog/categories/
No, I get the same error as you get as raised in your issue: https://github.com/Shazwazza/Articulate/issues/439. See my reply there.
This is merged and released, so can be closed.