Labels & messages in multisite - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Labels & messages in multisite

  • Labels & messages in multisite
  • Hi, 

    I have 4 sites in a multisite configuration. There are some labels that according to each site have different values.

    I tried to follow this tutorial without luck

    There it talks about FirstSite/SecondSite/ThirdSite .. and then it uses SiteSpecificSearchButtonResources2.cs and SiteSpecificSearchButtonResources3.cs as resources

    How is built the relationship between SiteSpecificSearchButtonResourcesXX and each site? Also, should I create SiteSpecificSearchButtonResources1.cs or SiteSpecificSearchButtonResources.cs would be the default?

    When getting the resource, should I call it so?

    var res = Res.Get<SiteSpecificSearchButtonResources>();

    Any guidance would be much appreciated, thanks.

  • I want to access a label, that i have added in "labels and messages" section for a multilingual site building purpose. (MVC widget) .I can access it via api inside controller of the widget like this:

    var resources = Res.Get<UserProfilesResources>();
                ViewBag.labelText = resources.Get("Name");
                ViewBag.buttonText = resources.Get("Submit");

    I want to know whether is there any way to access the same inside view. something like this , that works fine with web forms. : <%$Resources:UserProfilesResources,Name%> .

    Pls note : I am concerning about MVC view


  • Hi Roshith,

    In mvc views you can use it like that:

    <p>@Html.Resource("Year", "Labels")</p>

    And you need @using Telerik.Sitefinity.Frontend.Mvc.Helpers for that

  • Thank you Victor. Helpful