Component's view metadata.xml and layouts specific xml DTD

106 views
Skip to first unread message

Izhar Aazmi

unread,
Oct 14, 2016, 10:55:41 AM10/14/16
to joomla-...@googlegroups.com
I tried looking up for a place where I could reference as a guideline for creating the correct metadata xml for views and layouts. But I was not able to find some good examples.

Is there any documentation where I can get to know the full structure for those xml files? if not the DTD itself then few samples which are utilising all available features would be sufficient too.

PS: Please do not consider this as a general development related query, trust me this isn't.


View Izhar Aazmi's profile on LinkedIn Izharul Haque Aazmi (Izhar Aazmi)
Bhartiy Digital Laboratories and Bhartiy Web Technologies,
11 - Kaveri Enclave - II, Near Swarn Jayanti Nagar, Ramghat Road, Aligarh - 202 001 (UP), India
Visit: www.izharaazmi.com

Michael Babker

unread,
Oct 14, 2016, 10:58:29 AM10/14/16
to joomla-...@googlegroups.com
AFAIK there isn't any DTD for these files.  If someone does know the structure though it'd be good to get one added to https://github.com/joomla/schemas

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cms+unsubscribe@googlegroups.com.
To post to this group, send email to joomla-dev-cms@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.

Hannes Papenberg

unread,
Oct 14, 2016, 11:04:07 AM10/14/16
to Joomla! CMS Development

These files were used in 1.5 when there was no layout specific file for a menu item. In 1.6 that feature was removed "on purpose" (because the person that did remove it did not understand what it was for) and despite protest from several people, it was not put back in. Thus: these files are useless in joomla as of 1.6.

Hannes


Am 14.10.2016 4:58 nachm. schrieb "Michael Babker" <michael...@gmail.com>:
AFAIK there isn't any DTD for these files.  If someone does know the structure though it'd be good to get one added to https://github.com/joomla/schemas
On Fri, Oct 14, 2016 at 9:54 AM, Izhar Aazmi <izhar...@gmail.com> wrote:
I tried looking up for a place where I could reference as a guideline for creating the correct metadata xml for views and layouts. But I was not able to find some good examples.

Is there any documentation where I can get to know the full structure for those xml files? if not the DTD itself then few samples which are utilising all available features would be sufficient too.

PS: Please do not consider this as a general development related query, trust me this isn't.


View Izhar Aazmi's profile on LinkedIn Izharul Haque Aazmi (Izhar Aazmi)
Bhartiy Digital Laboratories and Bhartiy Web Technologies,
11 - Kaveri Enclave - II, Near Swarn Jayanti Nagar, Ramghat Road, Aligarh - 202 001 (UP), India
Visit: www.izharaazmi.com

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cms+unsubscribe@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.

brian teeman

unread,
Oct 14, 2016, 11:39:06 AM10/14/16
to Joomla! CMS Development
There is even a pr from @bakual to remove them from the core

brian teeman

unread,
Oct 14, 2016, 11:39:08 AM10/14/16
to Joomla! CMS Development

Izhar Aazmi

unread,
Oct 14, 2016, 11:58:53 PM10/14/16
to joomla-...@googlegroups.com

Well, in that case what are the alternatives for the purpose they served? As I can see the cms still uses them to create menu item types.

I have seen the PR from @bakual, that is regarding removal of unused or overall impactless metadata.xml files from the core components. It does not involve any logic that says we won't use metadata.xml files anywhere anymore.

His another PR also adds inheritance logic to the layout/view/component level metadata.

Therefore the question still remains the same – that how should these metadata files be written to possibly make use of all available features wherever applicable.


Александр Косарев

unread,
Oct 16, 2016, 12:27:03 PM10/16/16
to Joomla! CMS Development
Hi, I've managed to figure it out will was working on new Joomla MVC Library
At it's GitHub Repo at https://github.com/joomplace/JooYii see Readme.md file and look for "/site/view/examples/metadata.xml" section.

пятница, 14 октября 2016 г., 17:55:41 UTC+3 пользователь Izhar Aazmi написал:
> I tried looking up for a place where I could reference as a guideline for creating the correct metadata xml for views and layouts. But I was not able to find some good examples.
>
>
> Is there any documentation where I can get to know the full structure for those xml files? if not the DTD itself then few samples which are utilising all available features would be sufficient too.
>
>
> PS: Please do not consider this as a general development related query, trust me this isn't.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Bakual

unread,
Oct 21, 2016, 7:43:15 AM10/21/16
to Joomla! CMS Development
The files are currently unused in the CMS (thus my PR to remove them), but they can be used by extensions if they want to provide menu items based on views instead of layouts (eg old 1.5 style). I do that in my own extension.

Izhar Aazmi

unread,
Oct 21, 2016, 8:14:37 AM10/21/16
to joomla-...@googlegroups.com
Hi Bakual,

I need some advice in 3 things in these xml files.

Can you please guide me what the "msg" attribute mean in the view metadata, (btw, why it is abbreviated!)

I assume that the options tag represents a group of all layouts with each child element is a layout name. Am I right?

<metadata>
<view title="COM_XXX_VIEW_TITLE">
<message><![CDATA[COM_XXX_VIEW_AAA_DESC]]></message>
<options>
<default
name="COM_XXX_VIEW_AAA_TITLE"
msg="COM_XXX_VIEW_AAA_DESC"
/>
</options>
</view> </metadata>

And in the layout metadata what "option" attribute means:

<metadata>
<layout title="COM_XXX_VIEW_AAA_TITLE" option="COM_XXX_VIEW_AAA_OPTION">
<message><![CDATA[COM_XXX_VIEW_AAA_DESC]]></message>
</layout>
</metadata>

Thanks.

Bakual

unread,
Oct 21, 2016, 10:16:32 AM10/21/16
to Joomla! CMS Development
I had to look that up in the code to see where this comes from. I don't remember everything :)
It basically defines the URL to build, with the "default" tag it will just use the view and with an "option" tag you could define other request vars. The name and msg is the name of the menu item and the tooltip for it in the menuitem select modal.

Александр Косарев

unread,
Oct 21, 2016, 10:25:48 AM10/21/16
to Joomla! CMS Development
Hi,

No you can't pass layouts into options.
"default" means that additional var wouldn't be parsed for this request.
You can pass "default" or "option" tag into "options" tag.
"option" means that you can add additional value to the request. and it can be layout like:

<metadata>
    <view>
        <options var="layout">
            <default name="COM_EXAMPLE" msg="COM_EXAMPLE_DESC"/>
            <option name="COM_EXAMPLE_EXT" msg="COM_EXAMPLE_EXT_DESC" value="my_specific_layout" />
        </options>
    </view>
</metadata>


пятница, 21 октября 2016 г., 15:14:37 UTC+3 пользователь Izhar Aazmi написал:

Izhar Aazmi

unread,
Oct 21, 2016, 10:39:00 AM10/21/16
to joomla-...@googlegroups.com
Thanks for clarifying the stuffs so clearly Bakual and Alexander. Pardon me if thats not the correct english form of your name :-)

The only thing that I guess I'm still missing on is the "option" attribute in Layout xml  viz. <layout title="COM_XXX_VIEW_AAA_TITLE" option="COM_XXX_VIEW_AAA_OPTION">



Александр Косарев

unread,
Oct 21, 2016, 10:52:54 AM10/21/16
to Joomla! CMS Development
I believe that it's useless as I've seen no use (or at least reading) of it in Joomla.

пятница, 21 октября 2016 г., 17:39:00 UTC+3 пользователь Izhar Aazmi написал:
Reply all
Reply to author
Forward
0 new messages