Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Jun 30, 2016 @ 12:11
    Biagio Paruolo
    0

    Umbraco Document Type and Custom Section

    Hi,

    Is't possible to use an Umbraco Document Type in a custom section based on a custom code or better to use a custom model?

  • Marcin Zajkowski 112 posts 585 karma points MVP 7x c-trib
    Jun 30, 2016 @ 12:34
    Marcin Zajkowski
    0

    Hi Biagio,

    you can play with Document Types using ContentTypeService (https://our.umbraco.org/documentation/Reference/Management/Services/ContentTypeService). If your scenario is to use the content types and do something with your external data based on that - this is the way in my opinion.

    You can also provide feed based on structure from Content Section, but then you need to store documents in Content tree and just retrieve them / manipulate them / do whatever you want in your custom section. It's the same with creating the content. If you want to use documents based on document types, it's the best to use API methods / Services and ContentService.CreateContent(..) and other methods are working directly on Content section and tree.

    The truth is that custom sections are made to use them with data outside of Umbraco database tables. It's easier to play with them using PetaPoco objects or even easier with Tim's package - UI-O-Matic: https://our.umbraco.org/projects/developer-tools/ui-o-matic/.

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Jun 30, 2016 @ 13:02
    Biagio Paruolo
    0

    Hi,

    The only problem to use directly content section is that the url are associated to nodes and it's not good for my scope ( I know if I don't associate the template, I've 404 error and data are not visible and I don't like this ). I need something as virtual node/virtual content.

    I wish separate the content for "web pages and so" from "business content" managed by custom section ( that I've base configured ).

    So you suggest to use custom model with custom section + petapoco and use only Umbraco Document Type for content section. Is't right?

  • Marcin Zajkowski 112 posts 585 karma points MVP 7x c-trib
    Jun 30, 2016 @ 13:06
    Marcin Zajkowski
    0

    Hmm, check custom UrlProvider and ContentFinder possibilities: http://24days.in/umbraco/2014/urlprovider-and-contentfinder/. You can assign your custom urls to nodes and even don't assign them if you don't need them. Hope that it will help you solve this case.

  • Biagio Paruolo 1618 posts 1910 karma points c-trib
    Jun 30, 2016 @ 13:17
    Biagio Paruolo
    0

    In this case, I don't want assign them the url, so they are not "visible" . The document type will be a content of "document file" and some other information where backoffice works from Umbraco panel and the customers from "secured" frontend area.

Please Sign in or register to post replies

Write your reply to:

Draft