+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Radwindow popup styling and localization issue

Radwindow popup styling and localization issue

4 posts, 0 answered
  1. Bob
    Bob avatar
    10 posts
    Registered:
    18 Apr 2012
    08 Aug 2013
    Link to this post
    We are using SF as a framework for a CRM based app.  We have created many SF pages based on our own Master Page with our specific theme, etc.   The page styling and English localization are working perfectly.  Each of the pages contains custom widgets registered with SF and they are styling well.

    We also have the need to popup Radwindow based dialogs from the widgets.  These custom popup pages are based on a different master page also registered within SF and points to the same theme as the main master page.

    Unfortunately, the theme and localization is not getting applied to the popup dialogs so we have to manually add the CSS links to the popup master page as well as include LocalizationPath within these pages.

    We know since SF does not know about our custom dialogs it can't inject the resources into the HEAD tag like it does with SF virtual pages.  However, we wonder if there is any SF or Telerik RAD based control that we could add into our popup master page that could point to the SF theme and localization to accomplish this?

    This post is on behalf of a fully licensed SF customer.

    Bob Baldwin
    Trabon Solutions
  2. Boyko Karadzhov
    Boyko Karadzhov avatar
    56 posts
    Registered:
    05 Dec 2016
    09 Aug 2013
    Link to this post
    Hello Bob,

    Assuming your custom dialogs are hosted on the same web application, I think that what you need is the ResourceLinks control

    "The central control for the theming of Sitefinity backend is ResourceLinks control located in the [Telerik.Sitefinity.Web.UI] namespace. The purpose of the control is to link to resources and it should be used exclusively for adding any resources that could be different in various themes."

    Regards,
    Boyko Karadzhov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Bob
    Bob avatar
    10 posts
    Registered:
    18 Apr 2012
    09 Aug 2013 in reply to Boyko Karadzhov
    Link to this post
    Thank you Boyko,

    We know about the ResourceLinks control but, unfortunately, it does not meet our needs.  We were hoping you would have a control with a ThemeName property that points to an SF Frontend theme.  The control would lookup the theme and emit the CSS links within our popup master page with the same CSS as the main master page which is associated with the theme already and is fully under SF control.

    Also, we would like to know how to have our popup master refer to the same English localization resources that SF is using.

    If this is not currently available, can we add it as an official request to enhance SF?

    Thanks...Bob Baldwin
    Trabon Solutons
  4. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    14 Aug 2013
    Link to this post
    Hi Bob,

    We don't have such control, that would load all css files from a particular theme. As my colleague Boyko suggested, what we use is the resourceLinks control.

    As for your other question about the RadWindow. If you're opening the window in the context of Sitefinity, Sitefinity will have set the culture of the window itself. However, if your dialog is for example an aspx page it is out of the Sitefinity context and the resource references will not be parsed, because the aspx page won't pass through Sitefinity at all. For such scenario you can use the resources API to get a particular resource and set it as a text for some control (a label for example). here's an example on how you can get a resource entry in the code-behind of your dialog:
    var manager = ResourceManager.GetManager();
               var ci = CultureInfo.CurrentUICulture;
               var resource = manager.GetResourceOrEmpty(ci, typeof(EcommerceResources).Name, "EcommerceNodeTitle");

    Regards,
    Jen Peleva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered