1

I am developing N2cms Multilangual site and the problem is footer is same in both side which i didnt need i need seperate footer according to their language..So can anybody help me to solve this problem.

Biswo
  • 351
  • 3
  • 11
  • 19

1 Answers1

1

I suppose you are working with WebForms.

In the master page you should put this :

   protected ILanguageGateway languages;

   protected override void OnInit(EventArgs e)
   {
      if (CurrentPage != null)
      {
        languages = N2.Context.Current.Resolve<ILanguageGateway>();

        ContentItem language = languages.GetLanguage(CurrentPage) as ContentItem;
        f1.CurrentItem = language; /* Here is the trick */
        f2.CurrentItem = language;  
        dft.CurrentItem = language;

        base.OnInit(e);
      }
   }

Where f1, f2 and dft are Display controls.

Down is the design side for f1 :

<div class="footer">
    <n2:Display ID="f1" PropertyName="Footer1" Path="~/" runat="server" />
</div>
Samidjo
  • 2,315
  • 30
  • 37