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

Forums / Developing with Sitefinity / Share this content link not working

Share this content link not working

9 posts, 0 answered
  1. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    03 Feb 2010
    Link to this post
    I do not think I have this fix  because sometimes (if there is already content in there) the Share this content does not actaully share it...  is there a fix i can do? I am using 3.7
    [22547] Fixed problem with Share this content link not working content on the Generic Content control
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Feb 2010
    Link to this post
    Hi Laura,

    Could you give us the steps that you follow and exact build you use, so we could tell you whether the problem exists or the fix is related to another bug.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    23 Mar 2010
    Link to this post
    Ahh, I finally reproduced the behavior!
    I am using a custom control following this link:  http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-wrap-generic-conent-in-a-user-control.aspx that also has a property on the advanced tab for the title input.

    If I first put the control on the page, I can enter content on the Basic tab, and then go to the advanced tab and enter a title. I can go back and forth between the two tabs and the content is not lost. I can even go back into the control and go back and forth between the tabs editing the content and it keeps (which is the original bug that was fixed by the link above).

    The problem arises when you use Shared content. If you make any changes to it or even simply add the shared content, then switch to the Advanced tab then back to the Basic tab, it does not keep what you just did ior any changes made to the Shared Content.

    One thing i noticed is that without the Shared Content, on the Advnaced Tab the box for ProviderName was blank.  But when I was using Shared Content the box had "Generic_Content" .

    Does this make sense? I can send screen shots if you like...
    Thanks.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    24 Mar 2010
    Link to this post
    Hello Laura,

    Please use the following way to wrap the GenericContent control - how-to-wrap-a-generic-content-control-in-3-6-sp1. There are problems when you try to wrap GenericContent control is an user control.

    Greetings,
    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. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    24 Mar 2010
    Link to this post
    Yes, thanks.  I remember looking at that but that is sooo much more complicated!
  6. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    24 Mar 2010
    Link to this post
    It would be helpful to include instructions on how to incorporate into the website - it is similar to this example?
    http://www.sitefinity.com/blogs/Ivan/Posts/09-03-11/Sample_Generic_Content_based_module_Products_module.aspx
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    24 Mar 2010
    Link to this post
    Hello Laura,

    These are two completely different samples - one is module, another is control. The control can be added to each Sitefinity website in App_Data or compiled into dll as described in the KB.

    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.
  8. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    07 Apr 2010
    Link to this post
    Thank you.. I finally (duh) got the control here to work - using this way to wrap the GenericContent control - how-to-wrap-a-generic-content-control-in-3-6-sp1.

    Can you help me with one more item?  So My Control has a title area and then the Generic Content area as such:
    <div class="ExpandingCallout">
        <div class="simplebox simplelbox">
            <h2><asp:Literal ID="title" runat="server" Text="Module Title" /></h2>
            <div class="simpleboxBottom"><!-- --></div>                      
        </div>
    </div>
        <asp:Literal ID="content" runat="server" />

    Does anyone know of a way (maybe using something in the RadEditor) that I can store the Title as shared content (in the literal ID="Title")  along with the shared content that would go beneath it (in the literal ID="content") so that if the title changes and the control is on multiple pages, it will change across the board as well?  I just don't want the users to be able to touch the div items that surround the Title...  So I don't really want that stored with the shared content beneath it.
    So maybe the only solution is to store the titles as Shared Content that would have to be dragged onto the page separately - but can I make a 'template' of sorts where they can't touch the div's surrounding the Title?
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Apr 2010
    Link to this post
    Hello Laura,

    The only way to update the control data on multiple pages is when you use shared content item and the Title field is populated from the Title metakey of the content item. When the Title is changed you need to call OnSaving() to update the shared content

    public override void OnSaving()
      {
    staged = manager.GetStagedContent(this.DesignedControl.ContentID) as StagedContent;
     
    // here set the metadata
    manager.SaveContent(staged);
     
      }

    Another option would be storing the Title in a custom database table and all other controls will get the value of this field from your table.

    The users will not be able to change the divs of the title because they will work only with "Text" property of the control. If necessary you can expose it as a public property of the custom GenerericContent control.

    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.
Register for webinar
9 posts, 0 answered