Labels & messages in multisite

Posted by Community Admin on 04-Aug-2018 21:14

Labels & messages in multisite

All Replies

Posted by Community Admin on 05-Sep-2016 00:00

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 

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.

Posted by Community Admin on 23-Sep-2016 00:00

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

 

Posted by Community Admin on 06-Oct-2016 00:00

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

Posted by Community Admin on 07-Nov-2016 00:00

Thank you Victor. Helpful

This thread is closed