Skip to content

Commit

Permalink
Remove government-navigation
Browse files Browse the repository at this point in the history
This element is not required in the new layout as the header navigation is now embedded in the public layout.
  • Loading branch information
alex-ju committed Oct 4, 2021
1 parent 2f883a4 commit 0bd29a1
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,7 @@ def wrapper_class
"direction-#{page_text_direction}" if page_text_direction
end

def active_proposition
# Which of the government sections is the page part of?
# Derive this from the request path, eg: /government/consultations => consultations
active = request.original_fullpath.split("/")[2]
active_proposition_mapping.fetch(active, active)
end

def current_path_without_query_string
request.original_fullpath.split("?", 2).first
end

private

def active_proposition_mapping
# Some paths don't map directly to the position nav
# eg /government/news sits under 'announcements'
{
"news" => "announcements",
"fatalities" => "announcements",
}
end
end

0 comments on commit 0bd29a1

Please sign in to comment.