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.
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
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>