Copied to clipboard

Flag this post as spam?

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


  • Niels Kristiansen 166 posts 382 karma points
    Nov 24, 2013 @ 11:24
    Niels Kristiansen
    0

    Listview in Umb7

    Hello everybody :)

    I have found out to place a listview in the documenttype in Umbraco 7, and it's a really awesome feature, but... I can't find out to turn off the nodes shown in the content tree, so it only shows the nodes in the listview.

    Can anyone help me in the right direction and is it even possible?

    /Niels

  • Niels Kristiansen 166 posts 382 karma points
    Nov 27, 2013 @ 16:25
    Niels Kristiansen
    101

    Okay, found it myself.

    When you create a new document type, you have the possibility to choose that every page under it is in list view. Go to "Structure" under the parent document type and choose to activate "Enable list view". Now, no tree fold out is shown anymore :)

  • moshesa 8 posts 29 karma points
    Jan 07, 2014 @ 22:04
    moshesa
    0

    Is there a way to use both tree and listview but define some document types that will only be shown in the listview and not in the tree

  • Niels Kristiansen 166 posts 382 karma points
    Jan 07, 2014 @ 23:40
    Niels Kristiansen
    0

    Hi Moshesa,

    No, not as a standard anyway as it look. I have used Matt's http://our.umbraco.org/projects/backoffice-extensions/rbccontainerdocumenttype for projects on Umbraco 6.x. Here you can set up which document types you want to show in a listview.

    Anyway. What I would recommend you to do is bring the idea to the following forum http://our.umbraco.org/forum/core/general. I actually think it's a good idea you have there - to have some kind of xpath filter to control which document types that will show in listview and which one that should show in a treeview.

    Kind regards,

    Niels

  • moshesa 8 posts 29 karma points
    Jan 09, 2014 @ 06:02
    moshesa
    0

    Looks like a very good package, I will try it out, thanks.

  • moshesa 8 posts 29 karma points
    Jan 25, 2014 @ 21:20
    moshesa
    1

    Hello Niels,

    I Managed to do it with the rbcContainerDocumentType, its good for long list of documents which you dont want to see in the tree view, like you dont see the files on windows explorer folders tree... so in order to do it all you need is a little css an c#:

    just change the style in Umbraco\Plugins\uChildList\uChildListInjectCss.js to this:
    .leaf-override ul>li {display: none !important;} .leaf-override ul li.leaf-override {display:block !important;} /*.leaf-override { background: none !important; }*/

    and create a class in app_code which implements  IApplicationEventHandler, IApplicationStartupHandler with the following code:
    public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) {
    Umbraco.Core.Services.ContentService.Created += ContentService_Created; }
     
    void ContentService_Created(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.NewEventArgs e) { try { uChildListDataType.UmbracoEvents.LoadHiddenChildren(); 
    } catch (Exception xc) { System.Web.HttpContext.Current.Response.Write("moshe ContentService_Created EX (" + xc.ToString() + ")
    "); } } 

    you can also add this check:
    var item = e.Entity; if (item.ContentType.Alias == "[your contet type alias]") 
     

     

  • Johan 188 posts 380 karma points
    Jul 30, 2014 @ 17:31
    Johan
    0

    Moshesa!

    Did you get it to work in V7?

    That functionality definitely would be awesome in the Umbraco Core.

  • moshesa 8 posts 29 karma points
    Dec 28, 2014 @ 20:17
    moshesa
    0

    Hi Johan,

    Sorry but I didnt even try... I'm still using 6.1.6

  • Murray Roke 503 posts 966 karma points c-trib
    Apr 07, 2015 @ 07:18
    Murray Roke
    0

    vote for this issue for Umbraco7 http://issues.umbraco.org/issue/U4-4635

  • TrantSteel 4 posts 72 karma points
    Nov 06, 2016 @ 01:32
    TrantSteel
    0

    Hello,

    the listview feature in the umbraco backend is awesome!

    But how do i display the listview in a template, so i can see it in the frontend website? I should be able to access the property by its alias "layout" and then get the columns for example. How do i get the columns?

    var layout = CurrentPage.Content.GetProperty("layout");
    var columns = layout.Columns;
    

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft