Try Now
More in this section

Forums / Designing with Sitefinity / Share content across languages

Share content across languages

2 posts, 0 answered
  1. Lucas
    Lucas avatar
    65 posts
    22 Mar 2010
    24 Mar 2010
    Link to this post

    This might look like a silly question, but I am trying to find a way to share a content, say a GenericContent that has been marked as localizable, across the language-specific versions of my page.
    For maintainability purposes, I don't want having to go through every language to update that particular paragraph.

    I have tried marking the content as shared, but it seems that shared items are language specific. Am I missing something ?

    Relevant config snippets:

        <cmsEngine defaultProvider="Generic_Content">
            <add name="Generic_Content" urlRewriteFormat="[Publication_Date]/[Name].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="True" defaultMetaField="Name" securityProviderName="" allowLocalization="True" allowVersioning="True" allowWorkflow="False" allowComments="false" commentsModeration="true" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>
      <add key="Generic_Content.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="Name this content" mandatory="True" localizable="true"/>
      <add key="Generic_Content.Description" valueType="LongText" visible="True" searchable="False" sortable="True" defaultValue="Add description here" localizable="true"/>

    Thanks for your help!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    25 Mar 2010
    Link to this post
    Hello Lucas,

    You can achieve your goal by creating a custom view that inherits from ContentItemEdit class. This view is used when you are editing an item from the GenericContent module. In your custom view you have to override SaveContent method where you have access the the current IContent. You can get the content item ID from dataItemId local variable. After you have the content item you have update the other language versions as you want.

    You will need to do the same for GenericContent control. You have to create a custom control with a control designer that inherits from GenericContent. You have to override OnSaving() method of the custom GenericContentDesigner where you need to update the other language versions.

    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.
2 posts, 0 answered