How can I get value from Settings fields?

Mr Who asked on May 26, 2021 12:14

Hello guys,

I need to get value from Settings -> Content -> (Metadata) Page title format in code project. Could you help me please how can I get this value?

Thank you

Recent Answers


Mr Who answered on May 26, 2021 13:19 (last edited on May 26, 2021 13:56)

I've already figured it out:

SettingsKeyInfoProvider.GetValue("cmspagetitleformat", SiteContext.CurrentSiteName);


UPD: I guess it don't work because I changed the value for Page title format but I still get the follow result: {%prefix%} - {%pagetitle_orelse_name%} that was before changes.

Somebody know what the problem?

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on May 28, 2021 13:56

In regards to your update do you have a different value for the Global settings of "Page title format" and the site specific one?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.