CSS fixed on "Master Page" - what address?

Posted by Community Admin on 03-Aug-2018 15:08

CSS fixed on "Master Page" - what address?

All Replies

Posted by Community Admin on 26-Jan-2011 00:00

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...

Posted by Community Admin on 26-Jan-2011 00:00

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

Posted by Community Admin on 26-Jan-2011 00:00

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...

Posted by Community Admin on 27-Jan-2011 00:00

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

Posted by Community Admin on 27-Jan-2011 00:00

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...

 


 


Posted by Community Admin on 27-Jan-2011 00:00

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

Posted by Community Admin on 27-Jan-2011 00:00

<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.

 


 


Posted by Community Admin on 28-Jan-2011 00:00

Could anyone see my case? I can not even start our project. See print in the structure of my folders, it's all right.

Posted by Community Admin on 31-Jan-2011 00:00

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

Posted by Community Admin on 31-Jan-2011 00:00

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.

Posted by Community Admin on 31-Jan-2011 00:00

This project is currently installed on my desktop. What would be the difference inworking on my desktop to a local server of the company?

Posted by Community Admin on 31-Jan-2011 00:00

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

Posted by Community Admin on 31-Jan-2011 00:00

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 sitename/.../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

Posted by Community Admin on 31-Jan-2011 00:00

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 ...

Posted by Community Admin on 31-Jan-2011 00:00

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

Posted by Community Admin on 31-Jan-2011 00:00

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

Posted by Community Admin on 31-Jan-2011 00:00

@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

Posted by Community Admin on 31-Jan-2011 00:00

Thank you! Thank you! Thank you!

It worked! thank you very much!!! 

* Gotta Gechem the post ?*

This thread is closed