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

Created Issue: Should LanguageSwitcher.cshtml use these methods instead? [1615]

$
0
0
(I do not know which thread this should go on but....)
Reference: App_Data\Razor\composite\Navigation\LanguageSwitcher.cshtml

Currently it uses the references from CompositeC1WebPage, but this can result in a null reference to a non-nullable item later on, causing issues in the code for blended applications (such as mine).

var currentHomeID = HomePageNode.Id;
var currentPageID = CurrentPageNode.Id;

Converting this to use Composite.Data.SitemapNavigator methods causes a GUID.Empty to be entered instead of null, and prevents the downstream null issues, such as the yellow error box being displayed...it simply does not draw the language box: In my localized testing, I come up with the same pages, but, to my credit, I am running a very simple site with a depth of 3, no newsgroups or blog (yet).

var currentHomeID = Composite.Data.SitemapNavigator.CurrentHomePageId;
var currentPageID = Composite.Data.SitemapNavigator.CurrentPageId;

Viewing all articles
Browse latest Browse all 2540

Trending Articles



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