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

Forums / Developing with Sitefinity / Labels & messages in multisite

Labels & messages in multisite

2 posts, 0 answered
  1. Ale
    Ale avatar
    0 posts
    Registered:
    21 Jul 2016
    05 Sep
    Link to this post

    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 

    http://docs.sitefinity.com/customize-the-label-of-the-search-button-dynamically-set-the-label-of-the-search-button

    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.

  2. Roshith S
    Roshith S avatar
    0 posts
    Registered:
    05 Sep 2016
    23 Sep
    Link to this post

    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

     

2 posts, 0 answered