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

Forums / General Discussions / Custom module images not displaying after adding a secondary frontend language

Custom module images not displaying after adding a secondary frontend language

6 posts, 0 answered
  1. Sean
    Sean avatar
    5 posts
    Registered:
    26 Mar 2015
    10 Sep 2015
    Link to this post

    I used the following Sitefinity documentation to add multilingual functionality to a site that already had content.

    Persist multilingual fields in separate tables for each language

    http://docs.sitefinity.com/administration-persist-multilingual-fields-in-separate-tables-for-each-language
    Checked both Use Split Tables and Use Fetch Strategy

    Language Settings

    http://docs.sitefinity.com/administration-language-settings
    Added French as a language
    Set URL structure to use directories i.e. domain.com/es

    After doing some, any images for custom modules (built with Module Builder) are not displaying or being pulled through onto the frontend for either language.

     

    Below is an example of a template that is being used. All information is displaying correctly apart from any image related property (i.e. Background and Image) which appears to have no data. When editing the custom module item for either language I can see that both properties have an image.

    <%@ Control Language="C#" %>

    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.DynamicModules.Web.UI.Frontend" TagPrefix="sf" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>

    <%@ Import Namespace="SitefinityWebApp.Common" %>
    <%@ Import Namespace="Telerik.Sitefinity.Web.UI" %>

    <sf:DynamicDetailContainer id="detailContainer" runat="server">
        <LayoutTemplate>        
            <div class='flexslider-hero flexslider-<%# Eval("UrlName") %>'>
              <asp:Repeater runat="server" runat="server" DataSource='<%# Eval("SliderItems") %>'>
                <HeaderTemplate>
                  <div class="flexslider">
                  <ul class="slides">
                </HeaderTemplate>
                <FooterTemplate>
                  </ul>
                  </div>
                </FooterTemplate>
                <ItemTemplate>
                  <li>
                    <a href='<%# Eval("ButtonUrl") %>'>
                      <picture>
                        <!--[if IE 9]><video style="display: none;"><![endif]-->
                        <source media="(min-width: 768px)" srcset="<%# Eval("Background.MediaUrl") %>">
                        <source media="(min-width: 480px) and (orientation: landscape)" srcset="<%# Eval("Background.MediaUrl") %>">
                        <source srcset="<%# Eval("Image.MediaUrl") %>">
                        <!--[if IE 9]></video><![endif]-->
                        <img class="img-responsive center-block" src="<%# Eval("Background.MediaUrl") %>" alt="<%# Eval("Background.AlternativeText") %>" />
                      </picture>
                    </a>
                  </li>
                </ItemTemplate>
              </asp:Repeater>
        </LayoutTemplate>
    </sf:DynamicDetailContainer>

    Any ideas on what might be happening?

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    30 Sep 2016
    15 Sep 2015
    Link to this post
    Hello Sean,

    Can you please make sure that you have translated the images in the specified language? If the image is not translated in a particular language version it will not be displayed when browsing this language version of the page.

    Regards,
    Sabrie Nedzhip
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Mitra
    Mitra avatar
    3 posts
    Registered:
    07 Mar 2013
    16 Sep 2015 in reply to Sabrie Nedzhip
    Link to this post
    Replying to Sabrie Nedzhip comment
  4. Mitra
    Mitra avatar
    3 posts
    Registered:
    07 Mar 2013
    16 Sep 2015
    Link to this post
    Replying to First comment
  5. Mitra
    Mitra avatar
    3 posts
    Registered:
    07 Mar 2013
    16 Sep 2015
    Link to this post
    Reply to Sean
  6. Sebastian
    Sebastian avatar
    5 posts
    Registered:
    23 Jan 2014
    18 Sep 2015
    Link to this post

    Does that mean I have to have a image available for each language?

    Is it possible to show the EN language per default? Because it is not doable for us to change that many pictures.

    I am currently trying to add an image to my list-template and it is not showing after I installed two more languages.

    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Comments.Web.UI.Frontend" TagPrefix="sf" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Import Namespace="Telerik.Sitefinity.Web.UI" %>
    <%@ Import Namespace="Telerik.Sitefinity.Modules.Comments" %>
    <sf:SitefinityLabel id="title" runat="server" WrapperTagName="div" HideIfNoText="true" HideIfNoTextMode="Server" CssClass="sfitemFieldLbl" />
    <telerik:RadListView ID="dynamicContentListView" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <LayoutTemplate>
            <ul>
                <asp:PlaceHolder ID="ItemsContainer" runat="server" />
            </ul>
        </LayoutTemplate>
        <ItemTemplate>
            <li>
              <a href="<%# Eval("Link")%>">
                <img src='<%# Eval("Image.MediaUrl")%>' alt='<%# Eval("Image.AlternativeText")%>' title='<%# Eval("Image.Title") %>' />
                <h2><%# Eval("Title")%></h2>
                <p><%# Eval("SubTitle")%></p>
              </a>
             </li>
        </ItemTemplate>
    </telerik:RadListView>
    <sf:Pager id="pager" runat="server"></sf:Pager>

6 posts, 0 answered