Coder Social home page Coder Social logo

jayjayson84 / vsix.umbraco.dictionarybuilder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 651 KB

DictionaryBuilder is an unofficial Visual Studio extension for generating a strongly typed dictionary service and models for Umbraco. The extension is available to download and install from the VS marketplace using the link below.

Home Page: https://marketplace.visualstudio.com/items?itemName=JayJayson.UmbracoDictionaryBuilderExtension

C# 100.00%
umbraco umbraco-v8 umbraco8 umbraco-packages umbraco-backoffice vsix-extensions

vsix.umbraco.dictionarybuilder's Introduction

Umbraco DictionaryBuilder Extension

DictionaryBuilder is an unofficial Visual Studio extension for generating a strongly typed dictionary service and models for Umbraco.

Compatibility

[Visual Studio Versions:]

  • Community Edition 2019 V16.9.2

[Umbraco Versions:]

  • 8.11.1

* The extension may work with other versions of Visual Studio and Umbraco but has not been officially tested meaning that undesired results may occur. This list will be maintained as more testing is undertaken.

Getting Started

  1. Clone the repository.
  2. Open in Visual Studio.
  3. Build the solution.
  4. In Windows Explorer, navigate to \DictionaryBuilder\bin\{Debug/Release} in your solution's folder.
  5. Locate and install DictionaryBuilder.vsix.

Configuring Options

  1. Extension options can be configured in Visual Studio by navigating to:
    Tools > Options > Umbraco > DictionaryBuilder Options:
    Options Dialog
  2. A complete list of user preferences with the default option values and example SQL connection data can be viewed below (more information about each setting is shown below the property grid when highlighting an option):
    User Preferences
  3. The options file is saved in the same location as the solution using the naming convention:
    <solution name>.UmbracoDictionary.user. SQL passwords are encrypted using a System Key or Common Key as defined by the Encryption Method setting (see above screenshot) allowing you to commit this file into your repository.
    Options File
  4. The contents of the file is serialised using XML e.g.
    Options File Contents

(Re)building Dictionary

  1. An Umbraco Dictionary context menu is available when right clicking on any project within the Solution Explorer. Click on the Rebuild Dictionary command to export the latest version of the dictionary models along with a service, extension classes and interfaces etc:
    Rebuild Dictionary Command
  2. The exported files will be written to the paths defined in the extension options e.g:
    Exported Files Example
  3. Progress is written to the output window along with any error messages:
    Export Status

Example Source Code

  1. An example of the source code generated by the DictionaryBuilder can be found in this repository folder: Example Code.
  2. The example code is based on the following Umbraco dictionary structure which contains event messages to alert a content editor if they attempt to delete a node where this action has been disabled for their access level:
    Dictionary Structure
  3. When the content editor attempts to delete a configuration node e.g:
    Delete Content Node
  4. An alert is shown to the content editor. In this case the alert message is retrieved from the Umbraco dictionary using the exported DictionaryBuilder service and strongly typed class models:
    Alert Message
  5. Example source code usage (for the full example see the commented source code in ExampleUsage.cs):
    Example Code

Synchronise Database Tables

  1. It is possible to synchronise the dictionary database tables between development, staging and live deployments.
    IMPORTANT: It is strongly recommended to backup the destination database before doing so. The language table is not synchronised and it is therefore suggested that you check that the languages and id's match between deployments - otherwise dictionary values may be assigned to the wrong language after synchronising:
    Synchronise Dictionary Command
  2. You will be prompted to confirm your selection before the synchronisation begins:
    Synchronisation Prompt
  3. Progress is written to the output window along with any error messages:
    Synchronisation Status

vsix.umbraco.dictionarybuilder's People

Contributors

jayjayson84 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.