This is a migrated thread and some comments may be shown as answers.

Set relative path of external CSS

5 Answers 119 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Yvonne
Top achievements
Rank 1
Yvonne asked on 27 Nov 2007, 07:41 PM

Hi,

I have a question about setting relative path of external CSS file for the RadEditor in MOSS 2007.

These are the scenario:

I added the RadEditor control in a layout in Moss, and created two pages based on this layout:

http://mysite/PressReleases/pages/page1.aspx

http://mysite/Academics/pages/page2.aspx

In the ConfigFile.xml, I added the cssFiles property:

<property name="CssFiles">

<item>~/PressReleases/Pages/test.css</item>

</property>

This works fine, the styles in test.css appears in the Apply Css Class dropdown in the RadEditor. But what I what to achieve is to be able to let pages under individual subsite only use css file which exists in the same directory of the page. e.g. when user browses to http://mysite/PressReleases/pages/page1.aspx, only styles in http://mysite/PressReleases/pages/test.css is displayed in the CSS dropdown; and when user browses to http://mysite/Academics/pages/page2.aspx, only styles in http://mysite/Academics/pages/test.css is displayed in the dropdown.

So, how can I set the relative path of test.css in ConfigFile.xml ?

Thanks
Yvonne

5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 28 Nov 2007, 01:54 PM
Hello Yvonne,

In your case I would suggest to use different ConfigFile-s for your sites. This way you can specify separate CSS files for the 2 webs.
More information on the subject is available in the product's documentation, section How-To / Different configuration files for different webs.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Yvonne
Top achievements
Rank 1
answered on 28 Nov 2007, 06:38 PM
Hi Georgi,

When I followed the link Setting ConfigFile and ToolsFile properties for the WCM field , it seems like to me it won’t work for our case. Our RadEditor is in the layout, if I set the ConfigFile property in the layout to an absolute path, all the web page using this layout will use the same configFile, unless I can set a relative path for the ConfigFile. Ideally, we want to have ConfigFile and ToolsFile exist under individual web instead of the 12 Hive, so each web can have its own unique setting for the RadEditor. Is this possible?

Thanks
Yvonne

0
Lini
Telerik team
answered on 30 Nov 2007, 06:13 PM
Hello Yvonne,

Since each web has a unique id (GUID), you can put all the editor configuration files in a single location in the 12 Hive folder and the correct file will be used each time. You set the config file location without the unique ID, e.g. "/_wpresources/RadEditorSharePoint/4.4.1.0__1f131a624888eeed/RadControls/Editor/ConfigFile.xml" and then the editor will automatically look for the web-specific configuration files - for example:

ConfigFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml
ConfigFile{46ef762c-9f6f-11dc-8314-0800200c9a66}.xml
etc...


Greetings,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Yvonne
Top achievements
Rank 1
answered on 03 Dec 2007, 09:45 PM
Hello,

After I followed the steps in Get the UID of a SharePoint Web with RadEditor for MOSS, guids.config file was not created. Did I miss anything?

Thanks
Yvonne
0
Lini
Telerik team
answered on 04 Dec 2007, 12:37 PM
Hi Yvonne,

Which version of the RadEditor for MOSS do you have? I tested this feature in version 4.41 and it correctly created a guids.config file in \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.4.1.0__1f131a624888eeed\RadControls\Editor\guids.config

Did you open the control for editing? Try raising the trust level in the application's web.config to Full. Finally, check the MOSS account you are using and try one with Administrator privileges.
Sincerely yours,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
Yvonne
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Yvonne
Top achievements
Rank 1
Lini
Telerik team
Share this question
or