Copied to clipboard

Flag this post as spam?

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


  • Joel 1 post 71 karma points
    Aug 30, 2016 @ 08:41
    Joel
    0

    JS and CSS files not properly loaded in partial view for custom grid editor

    Hi.

    I am currently having some trouble with some of my custom grid editors which I´ve created using the fine package LeBlender https://our.umbraco.org/projects/backoffice-extensions/leblender/

    For example I´ve created a carousel aka bootstrap and when rendering it in the grid (in backoffice) it is rendering fine. However when it comes to the rendering in the actual page it seems like bootstrap css , bootstrap js and jquery is not getting loaded. Viewing the page in the developer console I can see a message that states bootstrap js requires jquery to function.

    So when creating a custom grid editor using Leblender, one must create a partial view under ..Grid=>Editors with the same name as the grid editor previous created. So the partial view is named Carousel.cshtml which is the same name as my grid editor is having.

    The markup is fine. I´ve checked it three times over but the rendering is horrible hence the (what I suspect) lack of css and js.

    All of the necessary files listed above is included in the masterpage. So I speculate that it wouldn´t be necessary to reference them again in the actual partial view.

    I´ve checked the style sheets included in the data type that the page is using which is TextpageGrid (from the starter pack). I can see there that bootstrap is checked.

    I´ve also tried in lack of other ideas to reference the css and js files directly into the partial view (Carousel.cshtml). For example:

    1. /css/bootstrap.min.css
    2. /js/jquery.min.js
    3. /js/bootrap.min.js

    Without the desired output. Then I tried instead to include the above files as CDN. When doing so it is working. Bootstrap classes is getting loaded and the transitions of the carousel is working fine. However I feel that this is not the best solution for this problem and I am grasping for straws here.

    May I bee lacking some using? Unfortunately I cannot attach the partial view due to the project is at another location at this time. If needed I can for sure attach it, if it helps to find a solution.

    Any help here is appreciated!

    Please feel free to get back to me if I am not making myself clear.

    Best, Joel

Please Sign in or register to post replies

Write your reply to:

Draft