Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 67 characters in body
Source Link

I'm adding a button to the toolbar using

JToolBarHelper::addNew('thing.add');

I want it to have the same effect as clicking on the following menu button:

    <menu
        view="thing"
        layout="add"
        img="class:banners"
        alt="Add thing"
        >
        Add thing
    </menu>

Is this possible? Seems like addNew cannot be used to use a view from another controller? I can get the button to use the method add from controller thing, but not to use view add from thing.

Edit: Fixed by messing around with controller/model naming.

I'm adding a button to the toolbar using

JToolBarHelper::addNew('thing.add');

I want it to have the same effect as clicking on the following menu button:

    <menu
        view="thing"
        layout="add"
        img="class:banners"
        alt="Add thing"
        >
        Add thing
    </menu>

Is this possible? Seems like addNew cannot be used to use a view from another controller? I can get the button to use the method add from controller thing, but not to use view add from thing.

I'm adding a button to the toolbar using

JToolBarHelper::addNew('thing.add');

I want it to have the same effect as clicking on the following menu button:

    <menu
        view="thing"
        layout="add"
        img="class:banners"
        alt="Add thing"
        >
        Add thing
    </menu>

Is this possible? Seems like addNew cannot be used to use a view from another controller? I can get the button to use the method add from controller thing, but not to use view add from thing.

Edit: Fixed by messing around with controller/model naming.

Source Link

Specify view and layout when adding a button with addNew()

I'm adding a button to the toolbar using

JToolBarHelper::addNew('thing.add');

I want it to have the same effect as clicking on the following menu button:

    <menu
        view="thing"
        layout="add"
        img="class:banners"
        alt="Add thing"
        >
        Add thing
    </menu>

Is this possible? Seems like addNew cannot be used to use a view from another controller? I can get the button to use the method add from controller thing, but not to use view add from thing.