Select to view content in your preferred language

Need URL to open in Current window

1338
1
02-28-2014 12:31 AM
Keithzammit
Emerging Contributor
Hey Guys,

SUPER URGENT question! I have a project where the client would like the map to have a number of links at the top and these links would take the user to another site with another map. Now it's important that the current session closes. I am currently using the link available from the (title and Links) option in the viewer but clicking on these just opens a new window and leaves the current one open! Any ideas?

I also found the code in the config/application.xml file which takes care of these links:
<HelpLinks>
    <HelpLink>
      <Url>http://www.newurl.com</Url>
      <DisplayText>newUrl</DisplayText>
    </HelpLink>
  </HelpLinks>


Maybe I can modify that to make it target the same window it's in?

Keith
0 Kudos
1 Reply
BrianLeroux
Frequent Contributor
You can change this by modifying the map layout that you are using. You need to find the correct layout xaml by looking in the .../config/layouts folder. In your layout xaml there should be a section for the HelpLinks. The line you need to search for will be <HyperlinkButton NavigateUri="{Binding Url}" TargetName="_blank" Foreground="{StaticResource AccentTextColorBrush}" >. You need to change TargetName="_blank" to TargetName="_self".

Each layout is dirrefernt so i can't tell you which line it will be in the xaml. if you can't find it just let me know which layout you are using and i will take a look at that specific layout.

Hope that helps..
0 Kudos