Vettvangur.DictionaryHelper 1.0.0

Umbraco helper to fetch dictionary items

There is a newer version of this package available.
See the version list below for details.
Install-Package Vettvangur.DictionaryHelper -Version 1.0.0
dotnet add package Vettvangur.DictionaryHelper --version 1.0.0
<PackageReference Include="Vettvangur.DictionaryHelper" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vettvangur.DictionaryHelper --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Umbraco DictionaryHelper

This project was specifically created to fix sql issues we had with the core Umbraco dictionary service.

All dictionary items are fetched and inserted into concurrency dictionary cache on start up and will be accessible with an extension on Umbraco helper.

Example of usage with Umbraco helper:

@using DictionaryHelper;

@Umbraco.DictionaryValue("key") //Fetches the value of the dictionary item. Returns empty string if not found.
@Umbraco.DictionaryValue("key", "Default value") //Fetches the value of the dictionary item. Returns the default value if value is empty or key not found.
@Umbraco.DictionaryValue("key", "Default value", true) //Fetches the value of the dictionary item. Returns the default value if value is empty or key not found and will create the dictionary item with the default value if the key is not found.

Example of usage with service:

using DictionaryHelper;

@Service.GetValueByKeyAndCulture("key", "en-GB") 
@Service.GetValueByKeyAndCulture("key", "en-GB", "Default value") 
@Service.GetValueByKeyAndCulture("key", "en-GB", "Default value", true)

Umbraco DictionaryHelper

This project was specifically created to fix sql issues we had with the core Umbraco dictionary service.

All dictionary items are fetched and inserted into concurrency dictionary cache on start up and will be accessible with an extension on Umbraco helper.

Example of usage with Umbraco helper:

@using DictionaryHelper;

@Umbraco.DictionaryValue("key") //Fetches the value of the dictionary item. Returns empty string if not found.
@Umbraco.DictionaryValue("key", "Default value") //Fetches the value of the dictionary item. Returns the default value if value is empty or key not found.
@Umbraco.DictionaryValue("key", "Default value", true) //Fetches the value of the dictionary item. Returns the default value if value is empty or key not found and will create the dictionary item with the default value if the key is not found.

Example of usage with service:

using DictionaryHelper;

@Service.GetValueByKeyAndCulture("key", "en-GB") 
@Service.GetValueByKeyAndCulture("key", "en-GB", "Default value") 
@Service.GetValueByKeyAndCulture("key", "en-GB", "Default value", true)

Release Notes

First public release. All dictionary items are fetched and inserted into concurrency dictionary cache on start up and will be accessible with an extension on Umbraco helper.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.5 7,672 12/22/2017
1.0.4 384 12/22/2017
1.0.3 325 12/22/2017
1.0.2 325 12/22/2017
1.0.1 314 12/22/2017
1.0.0 333 12/22/2017
Show less