Copied to clipboard

Flag this post as spam?

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


  • TrantSteel 4 posts 72 karma points
    Nov 22, 2016 @ 20:38
    TrantSteel
    0

    ListView Properties: Display columns

    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;
    

    Thank you

    enter image description here

  • John Hesman 8 posts 99 karma points
    Nov 22, 2016 @ 21:14
    John Hesman
    0

    Hi,

    I just had a quick look into this and the property doesn't come through to the front end of the website. It is always null. But the good news is that the data you want is available.

    The contents of the list view are child pages which you can get by using "CurrentPage.Children" You should then be able to build the page that you want with that information.

    I hope that helps.

    John

  • user111 4 posts 74 karma points
    Dec 08, 2016 @ 16:09
    user111
    0

    Hello! I get content by var itemNews = UmbracoContext.Current.PublishedContentRequest.PublishedContent.Children; I want show content to 2 column (column left and column right). Please help me!

Please Sign in or register to post replies

Write your reply to:

Draft