# Get websitemodel in backoffice panel

**URL:** <https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119>\
**Category:** Questions\
**Created:** [July 5, 2021, 12:17pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119 "2021-07-05T12:17:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSilfverala](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MSilfverala](https://forum.litium.com/u/MSilfverala)\
**Post date:** [July 5, 2021, 12:17pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/1 "2021-07-05T12:17:20Z")

</div>

I have a created a settings panel in Media, backoffice. I want to use the WebsiteModel from there.  
In other places i can do something like “website = \_requestModelAccessor.RequestModel.WebsiteModel” and then work with the values. But the RequestModel is null when i get here. Is there another way to get the WebSiteModel or can i get a populated RequestModel somehow?

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [July 5, 2021, 1:51pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/2 "2021-07-05T13:51:29Z")

</div>

`RequestModel` comes from the accelerator and isn’t available in the back office. BO is agnostic as to what website is used.

Could you simply get the website via `WebsiteService`? What is the settings panel for?

---

<div class="post-metadata">

**Author:** ![MSilfverala](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MSilfverala](https://forum.litium.com/u/MSilfverala)\
**Post date:** [July 5, 2021, 2:31pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/3 "2021-07-05T14:31:55Z")

</div>

Yes i can get the website via WebsiteService. But i can’t understand why i can’t get values the same way. If the website comes from the RequestModel i can do like this :  
var exampleValue = website.GetValue(AcceleratorWebsiteFieldNameConstants.ExampleValue);  
But that doesn’t give me any value if the website comes from WebsiteService. What is the difference. I create a WebsiteModel and pass the Website as parameter, so it looks the same as a website from the RequestModel, but it doesn’t behave the same. What am i missing?

---

<div class="post-metadata">

**Author:** ![MSilfverala](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@MSilfverala](https://forum.litium.com/u/MSilfverala)\
**Post date:** [July 5, 2021, 2:40pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/4 "2021-07-05T14:40:46Z")

</div>

OK, i had to pass cultureInfo as parameter to get values from the WebsiteService website.

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [July 5, 2021, 2:58pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/5 "2021-07-05T14:58:32Z")

</div>

Yes, and keep in mind that for the BO `CultureInfo.CurrentCulture` is what the user has selected as their editing language and `CultureInfo.CurrentUiCulture` is what they’ve selected as their interface language. Whereas for the public site these are connected to the settings on the channel.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [August 2, 2021, 2:59pm UTC](https://forum.litium.com/t/get-websitemodel-in-backoffice-panel/2119/6 "2021-08-02T14:59:17Z")

</div>

Closed on August 2, 2021, 2:59pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
