Hide a view
Within your component, for instance in the bar view in the foo component, you have a metadata.xml-file:
/components/com_foo/views/bar/metadata.xml
The first three lines of this component might look like this:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="Bar">
<message><![CDATA[BARDESC]]></message>
</view>
</metadata>
To hide this view from the menu manager, all you have to do is add the parameter hidden=true to the view element, like this:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<view title="Bar" hidden="true">
<message><![CDATA[BARDESC]]></message>
</view>
</metadata>
You can also hide a view by using an underscore in it’s name.
Hide a layout
Hiding a layout is done in a similar manner, but here you have to edit the layout’s XML-file. Let’s say you want to hide the default layout in the same view as in the example above. You then have to edit this file:
/components/com_foo/views/bar/tmpl/default.xml
In the same manner as above, you add hidden=”true”, but this time you add it to the layout element in the XML-file.
Author BEDRE reklame About A blog about web development techniques, tools, tips & tricks. read original Post here






































