diff --git a/app/models/communication/website/permalink/program.rb b/app/models/communication/website/permalink/program.rb new file mode 100644 index 0000000000000000000000000000000000000000..f18b2591aff96bdb53eb429ff8aa5091cc6804ed --- /dev/null +++ b/app/models/communication/website/permalink/program.rb @@ -0,0 +1,14 @@ +class Communication::Website::Permalink::Program < Communication::Website::Permalink + def self.required_in_config?(website) + website.has_education_programs? + end + + def self.static_config_key + :programs + end + + # /formations/:slug/ + def self.pattern_in_website(website) + "#{website.special_page(:education_programs).path_without_language}:slug/" + end +end