Copied to clipboard

Flag this post as spam?

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


  • Anders Bjerner 487 posts 2995 karma points MVP 8x admin c-trib
    Dec 04, 2014 @ 13:40
    Anders Bjerner
    0

    Adding a custom JavaScript file for the backoffice

    I'm currently working on a project for the Umbraco backoffice where I need to add some custom Angular routes before the ones provided by Umbraco by default (in the file /umbraco/js/routes.js).

    Since any JavaScript file I list in my package.manifest is added after /umbraco/js/routes.js, I haven't found a way to make this work.

    When running the site in debug mode, I can see that the individual JavaScript files are added via the URL /umbraco/Application (if not in debug mode, the files are bundled with ClientDependency).

    My question now is: Is it possible to modify which files are listed in the /umbraco/Application response? Eg. slip in my own JavaScript file right before /umbraco/js/routes.js?

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Dec 04, 2014 @ 22:35
    Shannon Deminick
    0

    Sorry, there's no way to do that. Perhaps if you added a custom WebApi route in ApplicationStarted that overlapped with /umbraco/Application, WebApi might use your WebApi route... then you'd have to duplicate exactly what the BackOfficeController.Application action does but you could return your own data.

  • Anders Bjerner 487 posts 2995 karma points MVP 8x admin c-trib
    Dec 05, 2014 @ 10:51
    Anders Bjerner
    0

    Thanks for your answer.

    My goal was to create custom pages that are not a part of a section/tree, but it seems to require too many hacks. Would be an awesome feature though.

Please Sign in or register to post replies

Write your reply to:

Draft