Copied to clipboard

Flag this post as spam?

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


  • Jorge Ribeiro 29 posts 213 karma points
    Nov 25, 2020 @ 18:20
    Jorge Ribeiro
    0

    Package and css

    Hello

    I've made a package that includes a surface controller with models, views and all. When I make my package I unclude de views, the dll in bin folder, the macro that invokes the controller, and the css that the views use. the css file is located in css folder of dev instllation.

    The contents of the packages shows all files except .css that is included inline in package.config.

    When I install my package in production the css file included is nowere shown.

    How can i published a css file and use it in packaged views?

    Regards, Jorge

  • Amir Khan 1287 posts 2744 karma points
    Nov 25, 2020 @ 21:08
    Amir Khan
    0

    Whats the reference to your css file from the config look like? Is it using an absolute path or relative to where your package?

  • Jorge Ribeiro 29 posts 213 karma points
    Nov 26, 2020 @ 13:20
    Jorge Ribeiro
    0

    Hi Amir

    thanks for your reply

    in my page i use this

    @{ Html.RequiresCss("~/css/multipageforms.min.css"); }

    the css is in css folder in development install. Then i pack all together, css and views, and the css is not deployed in ~/css of production site, as expected.

  • Amir Khan 1287 posts 2744 karma points
    Nov 26, 2020 @ 17:54
    Amir Khan
    0

    Idk if this is the answer...but I’d try putting that file in the appdata folder within your package folder and updating the reference. This could be an angular caching issue maybe?

  • Jorge Ribeiro 29 posts 213 karma points
    Nov 27, 2020 @ 17:30
    Jorge Ribeiro
    0

    ok... i managed to get it to work. put the css in a folder inside app_plugins. Follow site structure

    App_plugins
    ---Forms
    ------css
    ------FormABC
    ---------view1
    ---------view2
    ---------form-abc.css

    in view1 and view 2 i can include css files using

    <link rel="stylesheet" type="text/css" href="@Url.Content("~/App_Plugins/Forms/css/forms.css")" />
    

    but for the love of everything living in this planet i cannot use form-abc.css in view1 or view2.
    I tryied everything, and I mean everything...

    can you help me here?

    Regards

    Jorge

  • Jorge Ribeiro 29 posts 213 karma points
    Dec 11, 2020 @ 11:18
    Jorge Ribeiro
    0

    i stop trying. put css in view layout.

Please Sign in or register to post replies

Write your reply to:

Draft