Git Product home page Git Product logo

umbraco.codegen's Introduction

Umbraco Code Generator

Generates typed models for document types automatically. No templates, no buttons, no hassle, they're just there.

Generated classes are partial and all virtual for painless extension.

umbraco.codegen's People

Contributors

lars-erik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

umbraco.codegen's Issues

Problem when using Autofac in Developer Section

I am getting the following error when using AutoFac, clicking in the Developer section in the CMS. I am using Umbraco v7.1.4, and installing the module by running the Packaging proejct in the V7.1 branch of CodeGen.

Failed to retrieve data for application tree developer

at Umbraco.Web.Trees.ApplicationTreeExtensions.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Trees.ApplicationTreeController.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Trees.ApplicationTreeController.d__4.MoveNext()

Alias and name by convension

@peteduncan says
Finally not sure if this is in or not, but if you want to go the whole "less key strokes" route then you could get the doctype alias/name from the class name so:

class ProductVariant {}

would have a name of "Product Variant" and an alias of "productVariant" assuming no attributes where added/included. You can of course override these with attributes if you like.

Consider adding prefixes again

Has some issues with generating XML. Could pick it up from the alias passed to GetPropertyValue<>, but will be cumbersome, and possibly not at all necessary. Mostly nice-to-have.

Ability to use strongly typed models from DLL's?

It doesn't appear that CodeGen picks up models built into a dll that can be deployed to the site. Looking at the code, it doesn't appear to be doing any reflection for those types. Is there any particular reason for this?

U7 Composition Properties?

Excellent package!
Does the current NuGet version support Composition properties from Umbraco 7.2+?

I see that there is a Compositions section in the def.config file which properly lists any selected DocTypes, but none of their properties appear in the Model except for the Master DocType (if any).

Not sure if this is a bug, missing feature, or an incorrect implementation on my end.

Thank you!

CodeGen class preview

Backoffice: when using "Codegen preview class" on Document type, on the right side there is nothing.

Imports needs Umbraco.Web reference

Need to add the line

        ns.Imports.Add(new CodeNamespaceImport("Umbraco.Web"));

to the StandardImportsBuilder class so that the necessary using statement is included to support the GetPropertyValue<T> extension is supported.

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.