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

Forums / Developing with Sitefinity / Labels & messages in multisite

Labels & messages in multisite

4 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

     

  3. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    06 Oct in reply to Roshith S
    Link to this post

    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

  4. Roshith S
    Roshith S avatar
    0 posts
    Registered:
    05 Sep 2016
    07 Nov in reply to Victor Leontyev
    Link to this post
    Thank you Victor. Helpful
4 posts, 0 answered