Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve Jones 36 posts 84 karma points
    Apr 22, 2014 @ 01:55
    Steve Jones
    0

    Creating package using Umbraco MVC Macro Partials and third party library

    Hi Fellow Umbracians

    Not sure if this has been asked with these specific parameters but I know I have seen simiolar posts and none answered my particular proposed package.

    Using Umbraco 7.1.1 and .net 4.5 and a third party library

    1. I want to build a package where all of the functionality is encapsulated in the Macro Partials
    2. I want to be able to add a third party library to retrieve third party data 
    3. I want to use custom controllers, models and strongly typed views
    Now I know some of this is possible, but
    I would have to inherit from an Umbraco library inside the third party library to allow for this and building a dependency on Umbraco would mean I would have 2 way dependencies and I really dont want that
    And I would have to use the doctype name = controller name, template name = ActionResult name solution, beacuse I dont beleive I can have custom controllers and models with Macro Partials
    I think I have read the correct documentation on this so I dont think this is possible right now but heres hoping
    Steve

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 22, 2014 @ 12:12
    Jeroen Breuer
    0

    Hello,

    Why do you want to use macro partials? If you just use views you can use the route hijacking solution. If you want some good route hijacking examples have a look at the Hybrid Framework. It's still for v6 (v7 coming soon), but route hijacking still works the same.

    Jeroen

  • Steve Jones 36 posts 84 karma points
    Apr 23, 2014 @ 03:35
    Steve Jones
    0

    Hi Jeroen

    Thanks for coming back to me

    I have the solution you proposed working so its not a case of it wont work for me.

    If I am building a package as a solution i want it to be easy to use and unobtrusive. I also want the content editor to have an easy time and not have to deal with alot of templates and doctypes for no reason

    Encapsulating my functionality in a macro makes sense to me

    The other issue around strongly typed views has no other solution than to inherit from the Umbraco class?

    Steve

Please Sign in or register to post replies

Write your reply to:

Draft