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 1619 posts 1912 karma points c-trib
    Jul 01, 2015 @ 06:59
    Biagio Paruolo
    1

    Document Type as Data Container but don't need URL

    Hi,

    I need to create some document types and use them without "template" but only as node with data into the content and without URL. How to do this? Thank you.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jul 01, 2015 @ 07:47
    David Brendel
    0

    Hi Biagio,

    first question is why does the URL bother you at all? You can just don't use it.

    Umbraco automatically adds the URLs to wach node. If you really want to remove it then maybe its one possible solution to use a custom URL provider that overwrites the URL for the documenta types and set them to String.Empty vor something else what fits. Herr is a tutorial in how to do it:http://24days.in/umbraco/2014/urlprovider-and-contentfinder/

    Regards David

  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Jul 01, 2015 @ 09:30
    Biagio Paruolo
    0

    Hi,

    I don't want URL on that nodes because are only data container like document info or other info, that is a customer has some documents, but that documents must be no accessibile by URL. They are only a containers.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jul 01, 2015 @ 13:53
    David Brendel
    0

    Hi Biago,

    my way with this was to handle the container nodes Outsider if the Website structure. With this they get an URL but can't be visited by it.

    In your Website root you can add a property where you store the root of your data nodes. If you need access to one of it you can get the node with the ID stored in the property and then query/access them as needed.

    Regards David

  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Jul 01, 2015 @ 15:16
    Biagio Paruolo
    0

    Uhm..I don't like as solution...I think that it's better to have a node like a datastore...

  • Merritt Melker 6 posts 76 karma points
    Dec 22, 2015 @ 06:42
    Merritt Melker
    0

    Any headway with this? My current solution involves using a custom section but it's a lot of work to maintain.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Dec 22, 2015 @ 08:54
    Dave Woestenborghs
    1

    I also don't see the problem in "data containers" having a URL. As long that they don't have a template they will return an 404 page.

    Dave

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Dec 22, 2015 @ 13:38
    Dan Diplo
    0

    Dave is correct - a document type without a template will always effectively act as if it doesn't have a URL.

    Another option is to have a template that does a Response.Redirect(Mode.Content.Parent.Url) so it redirects to the parent node. Thus if it is visited you will end up on the parent page.

  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Dec 22, 2015 @ 14:15
    Biagio Paruolo
    0

    I like this last method, because is more controllabe and better for SEO.

  • Merritt Melker 6 posts 76 karma points
    Dec 24, 2015 @ 02:55
    Merritt Melker
    0

    Another solution is to implement custom 404 error handling. I believe this package, Umbraco Page Not Found Manager, could be used or at least steer you in the right direction.

    What bothers me is the design of umbraco. They have no built-in way to represent entities besides using document types as definitions and Content as instances.

    And yes, I have built a custom section, even used the recommended ORM PetaPoco and my several of my entities were built with 0-to-many relationships. But I had to begrudgingly trudge through creating a UI, after searching examples and analyzing them, for the backoffice to handle the CRUD. It's an excessively laborious process compared to just creating a Document Type.

    At the same time I might just not be "getting" it.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Dec 24, 2015 @ 11:31
    Dan Diplo
    0

    "What bothers me is the design of umbraco. They have no built-in way to represent entities besides using document types as definitions and Content as instances."

    There are at least two packages that have property editors that let you create multiple items as part of the page, as an alternative to using child document types.

    There are Archetype and Nested Content:

    https://our.umbraco.org/projects/backoffice-extensions/archetype/

    https://our.umbraco.org/projects/backoffice-extensions/nested-content/

  • Merritt Melker 6 posts 76 karma points
    Dec 24, 2015 @ 16:36
    Merritt Melker
    0

    In my current solution I use Archetype, but from my perspective it is a solution for creating complex properties (data types) which you can use within a Document Type.

    Nested Content is the same basic idea but it allows you to usee Document Types to as properties of other Document Types.

    Neither of these provide Biago with a "data source' model that isn't implicitly linked to his Content model.

  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Dec 24, 2015 @ 07:53
    Biagio Paruolo
    0

    Yes, using Petapoco and Entities, you lost the fast customization of document type by UI. Have you some example on how to have build ORM + entities ( document type ) and custom section? thx.

  • Merritt Melker 6 posts 76 karma points
    Dec 24, 2015 @ 16:48
    Merritt Melker
    0

    I do have an example but there are so many moving parts I can't just gist I'm going to have to move my repository from a private bitbucket to my public github account... in the meantime, these are the 2 examples I based my work on:

    Umbraco Uk Festival Custom sections code

    UkFest-AngularJS-Demo

    And probably the quickest way to get this working is to try this:

    UI-O-Matic allows you to auto generate an integrated crud UI in Umbraco for a db table based on a petapoco poco.

Please Sign in or register to post replies

Write your reply to:

Draft