More in this section

Forums / General Discussions / CSS fixed on "Master Page" - what address?

CSS fixed on "Master Page" - what address?

18 posts, 0 answered
  1. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    26 Jan 2011
    Link to this post
    I need to leave a file "css" fixed on "Master Page" ... I like the link to the file? in "Designer's Guide PDF" speech:

    "If you are using master pages, add the CSS and JavaScript in your. master page, using HTML" But does not show the address, anyone know the solution?

    Show ad print..

    Tks...
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Jan 2011
    Link to this post
    Hi renato,

    You can drop Css and/or JavaScript widgets that are available in our Widgets toolbar when you open a page or template for editing.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    26 Jan 2011
    Link to this post
    I did this, he seeks my file "css" css property but does not work, nor the basic.

    ///////////////////////////////////////
    html, body {
    background: black;
    }
    ///////////////////////////////////////

    *  when I click the "css"by the source, another one pops up that style is not mine .... * (print3)

    Another thing, it leaves the css of addressing as "absolute " ... how do I adjust this?
    See prints 2 and 3 please...
  4. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    27 Jan 2011
    Link to this post
    Hi renato,

    Thank you for using our services.

    As you know App_Data is specific folder in .net and you should skip it when attach css in your master page.
    In your case the path should be (test is the name of the template and the theme):

    <link href="/PortalTeste/Sitefinity/WebsiteTemplates/test/App_Themes/test/CSS/css.css" type="text/css" rel="Stylesheet"/>



    All the best,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    27 Jan 2011
    Link to this post
    I made the suggestion and it still does not work. In the source code is still pulling the App_Data folder.I left my folder structure and still does not work.

    I can not begin the project for this cause

    Show at print please...
  6. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    27 Jan 2011
    Link to this post
    Hi renato,

    From the screenshot it looks like you have missed the slash sign("/") at the beginning of the the path.

    I am attaching a print. Hope that you can start with your project now.

    Greetings,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    27 Jan 2011
    Link to this post
    <link href="/Amni/App_Data/Sitefinity/WebsiteTemplates/amni/App_Themes/tema/Styles/estilo.css" rel="stylesheet" type="text/css" media="all" />


    The
     address was correct but does not search the properties of the css, the css link in the source code leads me to an error page, see the prints.
  8. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    28 Jan 2011
    Link to this post
    Could anyone see my case? I can not even start our project. See print in the structure of my folders, it's all right.
  9. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    31 Jan 2011
    Link to this post
    Hi renato,


    It looks that you have some permissions problem. I am attaching a screenshot with my test. When the path is correct everything works fine, but when the path is wrong the error message says: "Could not find a part of the path...". On your screen the error message is "Forbidden". So can you check for some special permissions on the project folder/sub-folders? Also if the project is deployed on your desktop it is possible reason too.


    Best wishes,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    31 Jan 2011
    Link to this post
    I'm really working on my desktop, I'll check the permissions of the folders. What I find strange is that it works with and address relative or absolute, so I think something is really wide ...

    Our company bought the "Standard" version and do installation on local server, and if not more this problem I communicate you.
  11. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    31 Jan 2011
    Link to this post
    This project is currently installed on my desktop. What would be the difference inworking on my desktop to a local server of the company?
  12. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    31 Jan 2011
    Link to this post
    Hello renato,

    In Windows environment the Desktop folder is in the User's personal  folder - that is like "private". Probably this is the reason for the troubles with the permissions. Try to create a test project directly on "C:\" and see if there are still problems with the css links.


    Greetings,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    31 Jan 2011
    Link to this post
    Hi Renato and Jordan,

    The one important item you're both missing here is that Renato is including "App_Data" in his path. 

    Renato, as you probably know the "App_Data" folder in asp.net is a special folder.

    If you try to browse to http://sitename/app_data/themefolders/mycssfile.css it will fail. However Sitefinity has a routing engine in place that takes care of this.

    So if you're path to css is:
    /Amni/App_Data/Sitefinity/WebsiteTemplates/amni/App_Themes/tema/Styles/estilo.css

    you need to set it as: (notice NO App_Data folder in path)
    /Amni/Sitefinity/WebsiteTemplates/amni/App_Themes/tema/Styles/estilo.css

    Hope that gets you going.

    p.s. why Telerik chose to use a special protected .net folder for storing this kind of data is still beyond me but that's a topic for another thread...

    Cheers,
    Phill
  14. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    31 Jan 2011
    Link to this post
    It's my friend, thanks but the problem persists ... see Annex 2 print. One shows the addressing and other shows what happens to it when I click on this address ...

    If you can help me thank you, since I'm trying to work it makes one week and the project of our company is still ...
  15. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    31 Jan 2011
    Link to this post
    Hi Renato,

    As per my previous post, try removing "App_Data" folder from your path. What you're seeing in Print2.gif is a 403 error which means forbidden access which makes sense because the App_Data folder is a special folder that doesn't allow you to link directly to files in it (it's supposed to be used for storing data only not images and css files).

    Use this as your link to your style sheet:
    <link href="/Amni/Sitefinity/WebsiteTemplates/amni/App_Themes/tema/Styles/estilo.css" type="text/css" rel="stylesheet" />

    That should do the trick.

    Regards,
    Phill
  16. Jordan
    Jordan avatar
    172 posts
    Registered:
    20 Oct 2015
    31 Jan 2011
    Link to this post
    Hi Phill Hodgkinson,


    We already discussed the App_Data folder 7-8 posts above.


    Kind regards,
    Jordan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  17. Phill Hodgkinson
    Phill Hodgkinson avatar
    362 posts
    Registered:
    10 Nov 2004
    31 Jan 2011
    Link to this post
    @Jordan, I realize that it was mentioned but if you notice Renato keeps posting code samples with the App_Data folder in his path so obviously there's something lost in translation here. 

    Just trying to steer him in the right direction so he doesn't pull his hair out ;)

    Cheers,
    Phill
  18. renato
    renato avatar
    72 posts
    Registered:
    07 Jan 2011
    31 Jan 2011
    Link to this post
    Thank you! Thank you! Thank you!

    It worked! thank you very much!!! 

    * Gotta Gechem the post ?*
18 posts, 0 answered