Copied to clipboard

Flag this post as spam?

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


  • David Armitage 187 posts 758 karma points
    Dec 26, 2018 @ 12:28
    David Armitage
    0

    Umbraco Custom ListView Layout - Re-using default layout

    Hi Peeps,

    I am creating a custom listview layout and I was just wondering if anyone knows the locations of the default listview html / css setup.

    I've seen a few tutorials regarding creating a custom listview but they generally start from their own html.

    I basically want to re-use the default listview and work from that. My changes are very minimal such as a couple of color changes based on data variants. I dont see the point of creating a whole new layout from scratch when I can work with whats already there.

    Thanks in advanced.

    David

  • Marc Goodson 887 posts 5808 karma points MVP 4x c-trib
    Dec 27, 2018 @ 10:05
    Marc Goodson
    101

    Hi David

    I think the files you are looking for are located here:

    /umbraco/views/propertyeditors/listview/layouts/list/list.html

    and

    /umbraco/views/propertyeditors/listview/layouts/grid/grid.html

    The styles are in a LESS file in the Umbraco source here:

    https://github.com/umbraco/Umbraco-CMS/blob/dd6e764588d22ef2b7bce01fd504ece89834f181/src/Umbraco.Web.UI.Client/src/less/listview.less

    and these are compiled into a single minified css file:

    /umbraco/assets/css/umbraco.css

    I'd tend to avoid updating the files directly in the Umbraco folder, they are hard to maintain through an Umbraco upgrade - but maybe you could perhaps copy the html into the app_plugins folder and use this as the starting point for your custom view?

    regards

    Marc

  • David Armitage 187 posts 758 karma points
    Dec 27, 2018 @ 10:31
    David Armitage
    0

    Hi Marc,

    Thanks. I think this is exactly what I'm looking for.

    Yeah I planned to do exactly how you suggested and copy the style / html out into my plugin and start from there.

    Kind Regards

    David

Please Sign in or register to post replies

Write your reply to:

Draft