File tree Expand file tree Collapse file tree
concerns/standard_edition
configurable_document_types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,4 +16,13 @@ module StandardEdition::ChildDocument
1616 def is_child_document?
1717 parent_edition . present?
1818 end
19+
20+ def child_document_base_path_override
21+ return unless is_child_document?
22+
23+ parent_path = parent_edition . base_path
24+ fixed_path = type_instance . settings [ "fixed_path" ]
25+
26+ fixed_path . sub ( "$INHERITED" , parent_path )
27+ end
1928end
Original file line number Diff line number Diff line change 5050 }
5151 },
5252 "settings" : {
53- "base_path_prefix " : " /fixme " ,
53+ "fixed_path " : " $INHERITED/about " ,
5454 "publishing_api_schema_name" : " topical_event_about_page" ,
5555 "publishing_api_document_type" : " topical_event_about_page" ,
5656 "rendering_app" : " frontend" ,
Original file line number Diff line number Diff line change @@ -104,7 +104,10 @@ def change_note_required?
104104 end
105105
106106 def base_path
107- "#{ type_instance . settings [ 'base_path_prefix' ] } /#{ slug } "
107+ # Bit of a hack - would be nice to restrict all of the child document logic
108+ # to the ChildDocuments concern, but we can't override base_path in there and
109+ # fall back to the generic implementation here.
110+ child_document_base_path_override || "#{ type_instance . settings [ 'base_path_prefix' ] } /#{ slug } "
108111 end
109112
110113 def type_instance
You can’t perform that action at this time.
0 commit comments