Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Reusing content from one web page in another

$
0
0

Yes - page ID's do not change with language. Here is how you can check the language of a URL:

	CultureInfo culture = PageUrls.ParseUrl(URL).LocalizationScope;

And here is how you would be explicit about what data to get:

	CultureInfo culture = new CultureInfo("en-GB");using (DataConnection dc = new DataConnection(culture))
	{// all data read via dc will be en-GB data
	}
You very seldom have to care about language though. If your do not specify a language explicitly the language of the current page request will be used and this is almost always what you want.


Viewing all articles
Browse latest Browse all 2540

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>