Copied to clipboard

Flag this post as spam?

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


  • Remko 118 posts 283 karma points
    May 11, 2020 @ 11:20
    Remko
    0

    Custom layout for ListView, where to get itemproperties, by default not available, so only name column is shown

    Trying to create a custom layout for listview. I added my own layout to my custom listview. It almost works immediately, working from umb-table layout that's available in Umbraco source.

    Child items are loaded, so that's a good thing, but item properties (which columns should be shown) aren't loaded, used in this part...

     <div class="umb-table-cell" ng-repeat="column in vm.itemProperties">
                    <a class="umb-table-head__link" title="Sort by {{ column.header }}" href="#"
                       ng-click="sort(column.alias, column.allowSorting, column.isSystem)"
                       ng-class="{'sortable':column.allowSorting}" prevent-default>
                        <span ng-bind="column.header"></span>
                        <i class="umb-table-head__icon icon" ng-class="{'icon-navigation-up': isSortDirection(column.alias, 'asc'), 'icon-navigation-down': isSortDirection(column.alias, 'desc')}"></i>
                    </a>
                </div>
    

    How can I get these properties loaded in my custom layout, so columns will be loaded dynamically like in default list view?

    Any help appreciated!

  • Remko 118 posts 283 karma points
    May 12, 2020 @ 10:17
    Remko
    100

    I think I used wrong view for this, tableview instead of listview itself. I picked it out of umbraco source and now it's working!

Please Sign in or register to post replies

Write your reply to:

Draft