import_xml

  • 2 yrs ago
  • 136

Description

Allows to include external xml file.


Schema

Child nodes are not allowed.


Attributes

path - relative path to external file.


Example 

Simple example:

Ideally, these partials should be located in /engine/dynamic_content/partials/.

<import_xml path="partials/my_file.xml" />

Complex example:

base.xml

 <base>
    <block name="header">
        <div>Base Header</div>
    </block>
    <block name="main">
        <div>Base Main</div>
    </block>
</base>

page.xml

 <dog>
    <import_xml path="base.xml" skip_validation="1">
       <block name="header">
           <div>Header</div>
           <super/>
       </block>
     </import_xml>
</dog>

This skeleton tag will be rendered on the page like this:

 <dog>
   <base>
      <div>Header</div>
      <div>Base Header</div>
      <div>Base Main</div>
   </base>
</dog>

See also

<include>

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 2 yrs agoLast active
  • 136Views
  • 1 Following