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

Forums / Developing with Sitefinity / Editor Link Issue With Arabic Language

Editor Link Issue With Arabic Language

8 posts, 0 answered
  1. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    17 Sep 2010
    Link to this post
    I have created a page group with an Arabic display title

    الفهرس

    When I go into the Generic Content editor to and use the Link Manager to select a page within my Sitefinity site, this page group does not show. I tested by adding another page group with an English display title and it showed.

    How can this be fixed? I need to create an Arabic version of the site and would prefer to not copy/paste the url from the browser for my links.

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Sep 2010
    Link to this post
    Hello mcpdinkansas,

    Link Manager works with SiteMap only for the current culture. If your current culture is "English" you will not see "Arabic" pages in the SiteMap tree.

    If you want to change this behavior you have to create a custom WebUIEditor or override the behavior of the default one Telerik.Cms.Web.UI.CmsUrlWebEditor and replace the editor declaration inside Sitefinity/Admin/ControlTemplates/Pages/Dialogs/PagesSelector.ascx

    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. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    20 Sep 2010
    Link to this post
    This makes no sense. Why would the Pages Selector data for the Editor be different than the Pages Sitemap data, which shows all pages regardless of the current culture?

    Is there any way to remove the Culture filter applied to the Pages Selector data easily? It seems like complete overkill to create a custom control or override the control just to do this. I have very limited time to get this working.

    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Sep 2010
    Link to this post
    Hi mcpdinkansas,

    Initially we showed all pages in the tree. Then we received many requests to remove the pages that are not related to the current culture and we change this implementation. Page selector data is not different from the SiteMap - it reflects  the site map created for the current culture.
    The only way that I could come up to get around this issue is replacing the CmsUrlWebEditor.

    All the best,
    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
  5. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    20 Sep 2010
    Link to this post
    I have implemented the custom CmsUrlWebEditor as described in the blog post above. I now have an issue with function insertLink() on PagesSelector.ascx - How do I update this to read my selected node from my custom RadTreeView?

    Thanks
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Sep 2010
    Link to this post
    Hello mcpdinkansas,

    You have to register script block inside OnPreRender by using  RegisterClientScriptBlock and there pass attributes you want to return. For instance -PageUrl, PageTitle, PageUrlResolved

    Best wishes,
    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
  7. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    21 Sep 2010
    Link to this post
    Could you please provide an example of how to do this?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Sep 2010
    Link to this post
    Hi mcpdinkansas,

    Here is a sample code

       protected override void OnPreRender(EventArgs e)
            {
                base.OnPreRender(e);
     
     
                if (!Page.ClientScript.IsClientScriptBlockRegistered("selectedValue"))
                {
                    string script = @"
     
     
    function SelectValue(sender, eventArgs)
    {
        // add attributes here
    }
    ";
     
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "selectedValue",
                        script, true);
                }
            }

    Here is more description of the methods . WebUITypeEditor has a required property "Value" which you can use to persist selected item in the view state.

    Sincerely yours,
    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
Register for webinar
8 posts, 0 answered