Copied to clipboard

Flag this post as spam?

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


  • .Nash 2 posts 20 karma points
    Aug 02, 2009 @ 09:47
    .Nash
    0

    edit and display custom tables in backend

    Hello there,

    I am currently looking into umbraco if it can be a good base for future projects.

    What I want to to do: create some custom tables in the umbraco db, and make these available in the umbraco backend, where the data can be edited, added etc. Then the data is displayed on the website by retrieving it via NHibernate from the database.

    Is this possible in umbraco?

    Thanks in advance for any help/suggestions!

  • Roel Snetselaar 151 posts 305 karma points
    Aug 02, 2009 @ 10:58
    Roel Snetselaar
    0

    First question: Why do you think you need this? Because of course you can make any kind of document type with any given properties which will be stored in the default tables of Umbraco. Obviously you can make content pages, fill in the properties and render them in the front-end.

    On the other hand it is possible to extend Umbraco via the Umbraco API and have a custom section + pages in the Umbraco backoffice to fill these tables. For the frontend you could create Umbraco document types, content pages and master pages + usercontrols to present the data.

  • .Nash 2 posts 20 karma points
    Aug 02, 2009 @ 11:49
    .Nash
    0

    Hm, I am not sure how umbraco can handle complex relations in the backend (e. g. many to many relations) and display them in a form.

    So, basically what I would like to do have is a website where I can add "regular" content elements. I think this can be done quite easily with default umbraco methods.

    And then I want to be able to add e. g. complex product data in the backend. This data can be managed/edited by content editors. A product record for example contains a many to many relation to categories, which themselves are grouped in parent/child categories etc. This data is then displayed in the frontend, used in an ecommerce application in the frontend, which is also integrated in umbraco. At least that is what I need.

    To sum things up: the cms I am looking for must make it easy to define regular/simple content elements but it should also be possible to integrate complex custom applications that can be managed from the umbraco backend.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 02, 2009 @ 12:06
    Sebastiaan Janssen
    0

    Don't you think you'd be better off using a product like Commerce 4 Umbraco that can handel all this stuff for you?

    If that isn't an option, you can at least have a look at how Paul solved this problem, it's open source :-)

  • anthony hall 222 posts 536 karma points
    Aug 02, 2009 @ 12:29
    anthony hall
    0

    yeah commerce 4  umbraco  would be excellent an starting point. It's based on Dash Commerce which is using SubSonic as it's data layer. Dash commerce api allows you to add attributes if you wish to extend the your product. Tho i must admit on a recent project i haven't found the api flexible enough for the products that i'm working with. So i'm storing my products as nodes in umbraco.  Umbraco so extensible. I'm sure you could you could design a good model. 

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Aug 02, 2009 @ 20:10
    Richard Soeteman
    0

    Hi ,

     

    Commerce4Umbraco is based on DashCommerce indeed.

    To come back to the original question. I've did a client project recently where we integrated their custom database into Umbrac . I've written a new Umbraco datatype that could Map Database fields against Umbraco Editor fields for editing the data and display data into the Umbraco site using XSLT Extensions that returned the Data as xml. I've not only included flat data but also relations and many to many relations.

    Cheers,

     

    Richard

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Aug 03, 2009 @ 00:47
    Aaron Powell
    1

    There isn't any "plug and play" support out of the box, you would have to create your own custom Application and Trees.

    The wiki has a fairly extensive section on how to do this: http://our.umbraco.org/wiki/reference/api-cheatsheet/tree-api---to-create-custom-treesapplications

  • TimNape 12 posts 32 karma points
    Apr 14, 2011 @ 11:33
    TimNape
    0

    Hi Richard Soeteman

     

    I am also using datatypes to get data from my custom database tables - I store only the keys to the data as document properties.

    This however means that a distict SQL query is run for every field - of which some may be from one table or view.

     

    Is there a way I can create a data access class (like you can in Mojoportal) to fetch all the neccesary data for a type for display.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 16, 2011 @ 14:01
    Sebastiaan Janssen
    0

    I am not sure what you want to achieve exactly, but you can do anything you want in a datatype as it is a usercontrol or a C# class. If you want to use Entity Framework to get the data, just build it in, no problem. It's all just plain old C# / ASP.NET.

  • Cagatay Kalan 1 post 21 karma points
    Mar 07, 2012 @ 19:44
    Cagatay Kalan
    0

    I was searching for the same requirement to implement in Umbraco 5.I'm planning to develop a similar product management tool which is more like an MRP than an e-commerce site. The reason i want to store my custom entities is that, i assume, the dynamic schema of Umbraco which depends on nodes and attributes will be a bottlenect when complext queries and joins get involved in complex search scenarios.

    I've checked NHibernate mappings and there, i see that only one mapping Assembly is given to the Fluent configuration. So the first question is, Is there any extension point through which i can add another mapping assembly so that, default Nhibernate configurator maps my custom entities ?

    Then, what i plan is to store products, categories and etc using new content types and also duplicate some of this content to my custom tables on save. At the end, a product will be represented as a node , which enables it to be extended with additional properties, meanwhile, complex relationships will be stored in my own tables and used in queries.

    So what do you suggest ? Is it enough to store a hiveid field on my custom tables to relate the entity to the exact node ? How about the queries ? Since, values like node status like "Draft" or "Published" are stored in default umbraco system, i'll need to join my tables to find out if the related product or supplier is a published entity or not.

     

Please Sign in or register to post replies

Write your reply to:

Draft