Set relative path of external CSS

6 posts, 0 answers
  1. Yvonne
    Yvonne avatar
    4 posts
    Member since:
    Nov 2007

    Posted 27 Nov 2007 Link to this post

    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

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 28 Nov 2007 Link to this post

    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

  3. Yvonne
    Yvonne avatar
    4 posts
    Member since:
    Nov 2007

    Posted 28 Nov 2007 Link to this post

    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

  4. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 30 Nov 2007 Link to this post

    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
  5. Yvonne
    Yvonne avatar
    4 posts
    Member since:
    Nov 2007

    Posted 03 Dec 2007 Link to this post

    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
  6. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 04 Dec 2007 Link to this post

    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
Back to Top