Using a variable you can easily set the navigation. Horizontal navigation : Pass the variable to true. Vertical navigation: Pass the variable to false.