Developer forum

Forum » Swift » alternate
Peter Leleulya
Peter Leleulya
Reply

My Swift demo setup has alternate links in it's master template.
Shouldn't they be filtered on active area?
When I disable the Danish language the Danish alternate link still resides in the English output.

foreach (var language in languages).Where(language => language.Area.Active && !int.Equals(language.Area.ID, Dynamicweb.Frontend.PageView.Current().AreaID))

Replies

 
Nicolai Pedersen
Reply

Yeah - and some additional checks maybe?

if (language != null && language.Published && language.Active && language.Area.Active & language.Area.Published) {

The page it self can be inactive or unpublished and so can its area.

BR Nicolai

 

You must be logged in to post in the forum