Get com_menus to register views without a views folder?

6 views
Skip to first unread message

Matt Thomson

unread,
Nov 9, 2009, 11:46:48 PM11/9/09
to Joomla! General Development
If I have set up my application in a way that doesn't use the standard
views/view.html.php views/metadata.xml files, is there a way to get
com_menus to register a couple of views.

I've had a dig into com_menus and found the _getViews() function in
classes/ilink.php, and it seems to do what I expected, browser the
components/views folder.

Does anyone another way to register a "view"?

Thanks.

Matt.

Ian MacLennan

unread,
Nov 9, 2009, 11:55:34 PM11/9/09
to joomla-de...@googlegroups.com
Just put placeholder files there and then deal with the requests programmatically in your component.

Ian

Matt Thomson

unread,
Nov 9, 2009, 11:59:08 PM11/9/09
to Joomla! General Development
I can do that as a last resort, but I am trying to make the component
as small and tidy as possible, and hoping to find a more elegant
solution if its possible.

On Nov 10, 5:55 pm, Ian MacLennan <ian.maclen...@joomla.org> wrote:
> Just put placeholder files there and then deal with the requests
> programmatically in your component.
>
> Ian
>

João Neto

unread,
Nov 11, 2009, 12:59:35 PM11/11/09
to joomla-de...@googlegroups.com

You can put a tag <tasks> in the component xml file...

See the XML Component Configuration to more details!

>

>


--

João Neto <joao....@gmail.com>

@joao_neto

Gtalk: juaumn

+ 55 85 88664963

http://paralelosdigitais.wordpress.com

Matt Thomson

unread,
Nov 11, 2009, 2:35:17 PM11/11/09
to Joomla! General Development
Are you refering to the administrator menu bit where you can add tasks
to the admin menu, eg from here:
http://www.joomla-developer-resources.com/packaging/making-installation-package-for-your-joomla-component-joomla-1.html
The example is:
<administration>
<menu>Test</menu>
<submenu>
<menu task="">Test administration</menu>
</submenu>

Or are you talking about a way to go into com_menus, make a new menu
item(for the frontend menu), and have com_menus read the component xml
file, and display some tasks that the frontend user can link to.

If you do mean this, can you please post an example, or a link to an
example, I can't see <tasks> in any online docs.

Thanks,

Matt.

On Nov 12, 6:59 am, João Neto <joao.gsn...@gmail.com> wrote:
> You can put a tag <tasks> in the component xml file...
> See the XML Component Configuration to more details!
>
> Em Terça-feira 10 Novembro 2009, às 01:55:34, Ian MacLennan escreveu:
>
>
>
> > Just put placeholder files there and then deal with the requests
> > programmatically in your component.
>
> > Ian
>
> > On Mon, Nov 9, 2009 at 11:46 PM, Matt Thomson <mthomso...@gmail.com> wrote:
> > > If I have set up my application in a way that doesn't use the standard
> > > views/view.html.php views/metadata.xml files, is there a way to get
> > > com_menus to register a couple of views.
>
> > > I've had a dig into com_menus and found the _getViews() function in
> > > classes/ilink.php, and it seems to do what I expected, browser the
> > > components/views folder.
>
> > > Does anyone another way to register a "view"?
>
> > > Thanks.
>
> > > Matt.
>
> --
>
> João Neto <joao.gsn...@gmail.com>
Reply all
Reply to author
Forward
0 new messages