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

Forums / Suggestions / Shared Content Identification

Shared Content Identification

2 posts, 0 answered
  1. Steve L
    Steve L avatar
    2 posts
    Registered:
    17 Jul 2009
    30 Sep 2009
    Link to this post
    We use quite a bit of shared generic content throughout our sites and find it very anoying not to be able to determine which shared content is actually attached to a specific instance.  Whe you enter the edit mode, the interface clearly states when content is shared, so the data points are likely there.  You should display the name of the shared item at the same time. 

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Sep 2009
    Link to this post
    Hello Stephen Lupton,

    Thank you for your suggestion. Actually if you have thousands of shared content items it will be hard to know which one is displayed. We will consider this in a future implementation. At this stage I could suggest a custom way to get around this. Here are the steps.

    1. Create a custom control that inherits from GenericContent control.
    2. Create a custom designer for our custom control. The designer should inherits from GenericContentDesigner

    - override LayoutTemplatePath and use GenericContentDesigner.ascx from the External templates archive that can be found under your account downloads section.

    - add a new Label control inside the template. This label will be used to show the current item title. We will use GetMetaData method.

    sample code:

     public override string LayoutTemplatePath 
            { 
     
                get { return "~/CustomControls/elena/GenericContentDesigner.ascx"; } 
            } 
     
            protected override void InitializeControls(System.Web.UI.Control viewContainer) 
            { 
                base.InitializeControls(viewContainer); 
     
     
                if (this.DesignedControl.SharedContent != null
                { 
                   Title.Text = ((CustomGenericContent)DesignedControl).SharedContent.GetMetaData("Title").ToString(); 
                    
                } 
             } 
              

    - override selectDialog_Changed and add the same logic.

     protected override void selectDialog_Changed(object sender, EventArgs e) 
            { 
                base.selectDialog_Changed(sender, e); 
     
                if (this.DesignedControl.SharedContent.GetMetaData("Title") != null
                { 
                    ((CustomGenericContent)DesignedControl).Title.Text = this.DesignedControl.SharedContent.GetMetaData("Title").ToString(); 
                } 
           } 


    Just to let you know your Telerik points have been updated.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered