I am having trouble displaying country specific content.
I have a page (in this example called mypage) and it has some country specific content (called $ukContent).
I have a php function that returns a country code (called getCountry()).
In this situation 'mypage' can be a generic page that may or may not contain some country-specific content, so I need check both that the country code is UK and that there is specific uk content when i go to render the page.
Right now I have this:
<% control Page(mypage) %> <% control Top.getCountry %> <% if CountryCode == GB %> <% if ukContent %> $ukContent <% else %> $content <% end_if %> <% else %> $content <% end_if %> <% end_control %> <% end_control %>
My problem is that once I go into the 'Top.getCountry' section, I no longer have access to the $ukContent variable (from the 'Page(mypage)' section').
Is there a better way of handling country-specific content? Ideally the solution would allow me to continue the pattern of having optional country-specific content variables on each of my pages.
Any help would be much appreciated.