Can somebody explain what is the purpose of metadata.xml in components files? For example /components/com_content/metadata.xml
As it almost has no content and I've never seen this in use.
Can somebody explain what is the purpose of metadata.xml in components files? For example /components/com_content/metadata.xml
As it almost has no content and I've never seen this in use.
So the purpose of metadata.xml is storing the data that need to be shared across layouts:
each layout.xml inside of your view tmpl directory extends metadata.xml.
For example file /site/view/examples/metadata.xml
can look like this
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view>
<options var="additional_request_var">
<default name="COM_EXAMPLE" msg="COM_EXAMPLE_DESC"/>
<option name="COM_EXAMPLE_EXT" msg="COM_EXAMPLE_EXT_DESC" value="additional_request_var_value" />
</options>
</view>
</metadata>