#LOCAL("Alternate",0)
#IF(#DELETE)
#LOOP(#DeleteObjects)
#SET("Alternate",1-#Alternate)
#IF(#PortalSite.FlagGif) #ENDIF
#PortalSite.Country.Native / #Portal.NameOrAlias
#IF(#ExportAllProducts)
{AllProducts}
#ELSE
#CountProducts
#ENDIF
#ENDLOOP
#ELSE
#LOCAL("PortalSitesByCountry", #GET_PORTAL_SITES_BY_COUNTRY(#Shop.ID))
#IF(#COUNT(#PortalSitesByCountry))
#REM All PortalConfigs which not displayed here must be represented by a hidden field #ENDREM
#LOOP (#PortalConfigs)
#IF (#Class.Alias EQ "UniversalConfig")
#ENDIF
#ENDLOOP
#LOCAL("PrevCountry", "")
#LOOP(#PortalSitesByCountry)
#LOCAL("DisplayFeature", #FUNCTION("FeaturedActionAvailable", #Shop.Object, #UNDEF, #FeatureAlias))
#SET("PortalsAvailable", 1)
#IF(#DisplayFeature NE "NotVisible")
#IF(#PrevCountry NE #CountryNative)
#SET("Alternate",1-#Alternate)
#IF(#FlagGif)
#ENDIF
#CountryNative#IF(#ExistsPortalSiteOfSameCountry) / #TRANSLATE(#Language.Code3)#ENDIF
#LOCAL("Exists", 0)
#LOOP(#PortalConfigs)
#IF(#Alias EQ #PortalSiteAlias)
#SET("Alternate",1-#Alternate)
#IF(#DEFINED(#PortalURL) AND #PortalURL NE "")
#IF(#DEFINED(#Image)) #ENDIF
#ELSE
#IF(#DEFINED(#Image)) #ENDIF
#ENDIF #ProductPortalName
#IF(#PortalSiteIsMultiLanguage) - #PortalSiteLanguage.Code2 #ENDIF
#IF(NOT(#FeatureMaxValue))- {NotAvailableInThisShopType} #ENDIF #IF(#IsSandbox) ({SandBox}) #ENDIF
#IF(#ExportAllProducts)
{AllProducts}
#ELSE
#CountProducts {Show}
#ENDIF
#SET("Exists", 1)
#ENDIF
#ENDLOOP
#IF(NOT(#Exists))
#SET("Alternate",1-#Alternate)
#IF(#DEFINED(#PortalURL) AND #PortalURL NE "")
#IF(#DEFINED(#Image)) #ENDIF
#ELSE
#IF(#DEFINED(#Image)) #ENDIF
#ENDIF #ProductPortalName
#IF(#PortalSiteIsMultiLanguage) - #PortalSiteLanguage.Code2 #ENDIF
#IF(NOT(#FeatureMaxValue))- {NotAvailableInThisShopType} #ENDIF
#ENDIF
#ENDLOCAL
#SET("PrevCountry", #CountryNative)
#ELSE
#LOCAL("Exists", 0)
#LOOP(#PortalConfigs)
#IF(#Alias EQ #PortalSiteAlias)
#SET("Alternate",1-#Alternate)
#IF(#DEFINED(#PortalURL) AND #PortalURL NE "")
#IF(#DEFINED(#Image)) #ENDIF
#ELSE
#IF(#DEFINED(#Image)) #ENDIF
#ENDIF #ProductPortalName
#IF(#PortalSiteIsMultiLanguage) - #PortalSiteLanguage.Code2 #ENDIF
#IF(NOT(#FeatureMaxValue))- {NotAvailableInThisShopType} #ENDIF
#IF(#ExportAllProducts)
{AllProducts}
#ELSE
#CountProducts {Show}
#ENDIF
#SET("Exists", 1)
#ENDIF
#ENDLOOP
#IF(NOT(#Exists))
#SET("Alternate",1-#Alternate)
#IF(#DEFINED(#PortalURL) AND #PortalURL NE "")
#IF(#DEFINED(#Image)) #ENDIF
#ELSE
#IF(#DEFINED(#Image)) #ENDIF
#ENDIF #ProductPortalName
#IF(#PortalSiteIsMultiLanguage) - #PortalSiteLanguage.Code2 #ENDIF
#IF(NOT(#FeatureMaxValue))- {NotAvailableInThisShopType} #ENDIF
#ENDIF
#ENDLOCAL
#ENDIF
#ENDIF
#ENDLOCAL
#ENDLOOP
#ENDLOCAL
#ELSE
{NoPortalsAvailable}
#ENDIF
#ENDLOCAL
#ENDIF
#ENDLOCAL