Skip to content

Re-add support for redirecting department topics to homepages #78

Description

@adamfranco

The old codebase had a configurable set of redirects from the /topic/view/ action when the catalogId and topicId matched an item in a manual list like:

  "topic/department/ALAC" => { "url" => "http://go.middlebury.edu/ALAC" },
  "topic/department/AMCV" => { "url" => "http://go.middlebury.edu/AMCV" },
  "topic/department/AMLT" => { "url" => "http://go.middlebury.edu/AMLT" },
  "topic/department/AMST" => { "url" => "http://go.middlebury.edu/AMST" },
  "topic/department/ARBC" => { "url" => "http://go.middlebury.edu/ARBC" },
  "topic/department/ARDV" => { "url" => "http://go.middlebury.edu/ARDV" },
  "topic/department/ART" => { "url" => "http://go.middlebury.edu/ART" },
  "topic/department/BIOL" => { "url" => "http://go.middlebury.edu/BIOL" },
  "topic/department/CHEM" => { "url" => "http://go.middlebury.edu/CHEM" },
  "topic/department/CHNS" => { "url" => "http://go.middlebury.edu/CHNS" },
  "topic/department/CLAS" => { "url" => "http://go.middlebury.edu/CLAS" },
  "topic/department/CSCI" => { "url" => "http://go.middlebury.edu/CSCI" },
  "topic/department/DANC" => { "url" => "http://go.middlebury.edu/DANC" },
  "topic/department/ECON" => { "url" => "http://go.middlebury.edu/ECON" },
  "topic/department/EDST" => { "url" => "http://go.middlebury.edu/EDST" },
  "topic/department/ENAM" => { "url" => "http://go.middlebury.edu/ENAM" },
  "topic/department/ENGL" => { "url" => "http://go.middlebury.edu/ENGL" },
  "topic/department/ENVS" => { "url" => "http://go.middlebury.edu/ENVS" },
  "topic/department/FMMC" => { "url" => "http://go.middlebury.edu/FMMC" },
  "topic/department/FREN" => { "url" => "http://go.middlebury.edu/FREN" },
  "topic/department/FYSE" => { "url" => "http://go.middlebury.edu/FYSE" },
  "topic/department/GEOG" => { "url" => "http://go.middlebury.edu/GEOG" },
  "topic/department/GEOL" => { "url" => "http://go.middlebury.edu/GEOL" },
  "topic/department/GRMN" => { "url" => "http://go.middlebury.edu/GRMN" },
  "topic/department/HARC" => { "url" => "http://go.middlebury.edu/HARC" },
  "topic/department/HIST" => { "url" => "http://go.middlebury.edu/HIST" },
  "topic/department/HUDV" => { "url" => "http://go.middlebury.edu/HUDV" },
  "topic/department/INDE" => { "url" => "http://go.middlebury.edu/INDE" },
  "topic/department/INTD" => { "url" => "http://go.middlebury.edu/INTD" },
  "topic/department/INTL" => { "url" => "http://go.middlebury.edu/INTL" },
  "topic/department/IPEC" => { "url" => "http://go.middlebury.edu/IPEC" },
  "topic/department/ISEA" => { "url" => "http://go.middlebury.edu/ISEA" },
  "topic/department/ISRU" => { "url" => "http://go.middlebury.edu/ISRU" },
  "topic/department/ITAL" => { "url" => "http://go.middlebury.edu/ITAL" },
  "topic/department/JAPN" => { "url" => "http://go.middlebury.edu/JAPN" },
  "topic/department/LITP" => { "url" => "http://go.middlebury.edu/LITP" },
  "topic/department/LITS" => { "url" => "http://go.middlebury.edu/LITS" },
  "topic/department/MATH" => { "url" => "http://go.middlebury.edu/MATH" },
  "topic/department/MBBC" => { "url" => "http://go.middlebury.edu/MBBC" },
  "topic/department/MUSC" => { "url" => "http://go.middlebury.edu/MUSC" },
  "topic/department/NSCI" => { "url" => "http://go.middlebury.edu/NSCI" },
  "topic/department/PGSE" => { "url" => "http://go.middlebury.edu/PGSE" },
  "topic/department/PHED" => { "url" => "http://go.middlebury.edu/PHED" },
  "topic/department/PHIL" => { "url" => "http://go.middlebury.edu/PHIL" },
  "topic/department/PHYS" => { "url" => "http://go.middlebury.edu/PHYS" },
  "topic/department/PSCI" => { "url" => "http://go.middlebury.edu/PSCI" },
  "topic/department/PSYC" => { "url" => "http://go.middlebury.edu/PSYC" },
  "topic/department/RELI" => { "url" => "http://go.middlebury.edu/RELI" },
  "topic/department/RUSS" => { "url" => "http://go.middlebury.edu/RUSS" },
  "topic/department/SISP" => { "url" => "http://go.middlebury.edu/SISP" },
  "topic/department/SOAN" => { "url" => "http://go.middlebury.edu/SOAN" },
  "topic/department/SPAN" => { "url" => "http://go.middlebury.edu/SPAN" },
  "topic/department/STLD" => { "url" => "http://go.middlebury.edu/STLD" },
  "topic/department/TEDU" => { "url" => "http://go.middlebury.edu/TEDU" },
  "topic/department/THEA" => { "url" => "http://go.middlebury.edu/THEA" },
  "topic/department/WAGS" => { "url" => "http://go.middlebury.edu/WAGS" },
  "topic/department/WRPR" => { "url" => "http://go.middlebury.edu/WRPR" },

This should be reimplemented in the new codebase for consistency.

Alternatively, we could provide links to the department site on these /topic/view/* pages. These pages are still useful for providing a listing of sections by term, so a department homepage link might be a better addition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions