Copied to clipboard

Flag this post as spam?

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


  • Developer 22 posts 123 karma points
    Jun 28, 2018 @ 07:21
    Developer
    0

    Differentiate Allowed child node types

    Hello,

    I need to develop functionality that contains contents like

    Category -> Subcategory -> Content Or Category -> Content

    For Example,

     World News   (Category)
             USA (Sub Category)
                 USA News1 (Content)
                 USA News2    (Content)
             Denmark (Sub Category)
                 Denmark News1  (Content)
                 Denmark News2     (Content)
             Common News1 (Content)
             Common News2  (Content)
    

    I have different Document type for News Category, News sub category and content. News sub category and content are Allowed child node types of News Category.

    Now I need to display subcategory ( USA and Denmark) in Tree view under World news and content in List view (Common News1 and 2 will be inside World News and USA news 1 and 2 inside USA and so for Denmark)

    Is there any way to achieve this? Or any package will also be helpful.

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Jun 28, 2018 @ 08:16
    Frans de Jong
    0

    There is no way to mix tree view and list view. You have to choose the presentation on the parent documenttype and this go's for every child.

    In your case if you set World news to listview you must set sub category to list view to to be able to get to the content (e.g. USA News 2).

    The other option is to have treeview on World news and have listview on Category. But than the tree will contain news 1 and news 2.

    Frans

  • Developer 22 posts 123 karma points
    Jun 29, 2018 @ 04:24
    Developer
    0

    Hey Frans,

    Got your point. Is there any way to differentiate both child in list view? Like children of Subcategory in Tab 1 and children of Content in Tab 2.

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Jun 29, 2018 @ 06:10
    Frans de Jong
    0

    The icons of a documenttype are shown in the first column of a listview. If you use different icons on a document type you can differentiate them by the icon.

    If that's not enough you can edit the listview by clicking on custom listview. Here you can choose to add a documenttype column. This will show the documenttype alias.

    Frans

    Edit: Don't forget to safe your listview and than save your documenttype. the save button of the listview is in the bottom of the listview. Can be a little confusing.

  • Developer 22 posts 123 karma points
    Jun 29, 2018 @ 12:11
    Developer
    100

    Hey Frans,

    Thanks for the reply.

    After some digging, i found this package Opten.Umbraco.ListView for restricting DocumentType to be displayed in a list view.

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Jun 29, 2018 @ 12:12
    Frans de Jong
    0

    Nice, will the others remain visible in the tree?

  • Developer 22 posts 123 karma points
    Jun 29, 2018 @ 12:29
    Developer
    0

    No, I have set Enable list view to True so nothing will be displayed in the tree.

Please Sign in or register to post replies

Write your reply to:

Draft