Copied to clipboard

Flag this post as spam?

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


  • Zagros 12 posts 32 karma points
    Dec 18, 2010 @ 02:45
    Zagros
    0

    How to create complex data types

    I'm used to CMS models where pages and content types aren't the same.  I just started using Umbraco  but I'm having difficulty trying to understand where to begin learning how to do this.  Here is what I'm trying to achieve.

    I want to have the following content definitions: a content named "Category" and another named "Product" belonging to a given "Category"

    Here is the summary:

    • Category
    1. has name
    2. has a thumbnail image
    • Product
    1. has a name
    2. has a description
    3. belongs to a category
    4. has a picture

     

    I want to define these somewhere.  Then create a bunch of categories, and a handful of products.  Then use them accross homepage, product page, etc etc....

    thanks in advance

     

     

     

     

     

     

  • Rich Green 2246 posts 4008 karma points
    Dec 18, 2010 @ 12:03
    Rich Green
    0

    Hey,

    The key question here is can a product be in more than one category?

    If not then you can simply set up your site like this:

    Content

    - Home

    - Category 1

    - Product A

    - Product B

    - Category 2

    - Product C

    - Product D 

    Rich

  • Comment author was deleted

    Dec 18, 2010 @ 13:03

    Hi Zagros,

    If you are new to umbraco, check out our introduction videos on umbraco.org

    http://umbraco.org/help-and-support/video-tutorials/introduction-to-umbraco

    (the first one on doc types should answer your question)

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Dec 18, 2010 @ 13:36
    Hendy Racher
    0

    Hi Zagros,

    Yes, it's a bit of a shift in mindset to use the content tree for both page nodes and data nodes, but it works really well (it's also easy to ensure that everything beneath Back Office won't be served).

    If you want to be able to tag a product with multiple categories, how about a content tree something like:

    Your product nodes (being pages ?) would sit in the appropriate place in under the Home node, and to associate a product with one or more categories, use a multipicker such as the built-in UltimatePicker, (others include AutoComplete, Axendo Ultimate Picker XPath, Berto Ultimate Picker, Multi-Node Tree Picker, Tree Multi Picker, XPath CheckBoxList)

    The multipickers will store a CSV value on the product node of any associated category IDs.

    Hope this helps offer an insight into one of many posisble approaches,

    Cheers,

    Hendy

  • Zagros 12 posts 32 karma points
    Dec 18, 2010 @ 21:16
    Zagros
    0

    I think what Hendy Pacher suggested works best.  I see from your screesshot you have a Home node and your pages under it.  Then you have this "back office" that holds your "DATA" models.

    thanks

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft