Git Product home page Git Product logo

episerver-dynamic-templates's People

Contributors

deanebarker avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

episerver-dynamic-templates's Issues

Implement a custom property for "Template"

The code in "the Template property" (see parenthetical under Step 6 of the demo install guidelines), needs to be encapsulated in a custom property. Currently, the property looks like this:

public virtual ContentArea Template
{
    get
    {
        var localValue = this.GetPropertyValue(p => p.Template);
        var locator = ServiceLocator.Current.GetInstance<IDynamicTemplateResolver>();
        return locator.GetTemplate(localValue, this);
    }
    set { this.SetPropertyValue(p => p.Template, value); }
}

If this was a custom property, there are two benefits:

  1. The code is encapsulated so it doesn't have to be copied and pasted. If we make improvements in the future, properties would have to be manually updated.
  2. This property could be assigned via the UI, which means editors could create new content types from the UI, and template them. Since the code has to be copied into a content model file right now, modeling has to be code-first

Remove Fluid-specific types from ITemplatingService

The ITemplatingService has a couple of methods that expose TemplateContext, which is a Fluid-specific type. This really defeats the purpose of DI. These need to be removed so that interface isn't implementation-specific.

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.