adding logic to figure out current page type, logic and styling for text links