Skip to content

Commit

Permalink
Add support for <additional-path>
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Nov 8, 2024
1 parent e5885c3 commit eaa2ced
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/resources/concrete-cif-1.0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -2324,6 +2324,11 @@
<xs:attribute name="country" type="country-id-required" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="additional-path" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="path" type="string-required" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="hreflang" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
Expand Down Expand Up @@ -2442,6 +2447,11 @@
<xs:documentation>The locale element is just for pages, not for single pages</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(additional-path)">
<xs:annotation>
<xs:documentation>The additional-path element is just for pages, not for single pages</xs:documentation>
</xs:annotation>
</xs:assert>
<xs:assert test="not(hreflang)">
<xs:annotation>
<xs:documentation>The hreflang element is just for pages, not for single pages</xs:documentation>
Expand Down
7 changes: 7 additions & 0 deletions src/test/resources/cifs-bad/additional-paths-1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<concrete5-cif version="1.0">
<pages>
<page name="Home" path="/actual" filename="" template="full" user="admin" description="" package="">
<additional-path />
</page>
</pages>
</concrete5-cif>
7 changes: 7 additions & 0 deletions src/test/resources/cifs-bad/additional-paths-2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<concrete5-cif version="1.0">
<pages>
<page name="Home" path="/actual" filename="" template="full" user="admin" description="" package="">
<additional-path path="" />
</page>
</pages>
</concrete5-cif>
7 changes: 7 additions & 0 deletions src/test/resources/cifs-bad/additional-paths-3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<concrete5-cif version="1.0">
<singlepages>
<page name="Calendar &amp; Events" path="/dashboard/calendar" filename="/dashboard/calendar/view.php" pagetype="" description="" package="">
<additional-path path="/alias" />
</page>
</singlepages>
</concrete5-cif>
8 changes: 8 additions & 0 deletions src/test/resources/cifs-good/additional-paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<concrete5-cif version="1.0">
<pages>
<page name="Home" path="/actual" filename="" template="full" user="admin" description="" package="">
<additional-path path="/alias-1" />
<additional-path path="/alias-2" />
</page>
</pages>
</concrete5-cif>

0 comments on commit eaa2ced

Please sign in to comment.