view->Assets->image('add', 'toolbar/');echo $this->view->Toolbar->renderButton("add",$drawUrl,"Add Attendee",$drawImage);I also use _EDIT_ to display an Edit link for each of the records.Each one produces different HTML code:_EDIT_ produces an tag with this href value:href="/joomla/index.php/home/manage-cruises?cont=lists&ccname=CruiseAttendeeListMgr&act=edit&gcb=456"renderButton produces the following:Add AttendeeThe both obviously call the same CFv5 Form, but using different URLs. The front-end template uses a three column display configuration: Menu items on the left, the main article in the center and a stack of modules down the right-hand side.The problem am having is that I have configured the CCv5 front-end display, using a hidden menu items, to not display the right-hand side modules. This works fine when clicking on the _EDIT_ generated link; the modules are hidden.But when I click on the renderButton generated button, it displays the CFv5 form as expected in the center position, but all the should be hidden modules are present on the right-hand side.I have created a hidden menu item for the CCv5 connection, and a separate one for the CFv5 form.I swear this was working fine before I upgraded to Joomla! 3.5.x, but I cannot be certain.What to I need to do to get the Add and Edit displays of the shared CFv5 form to both hide the right-han"> CCv5 Module display different for _EDIT_ vs renderButton - Forums

Forums

CCv5 Module display different for _EDIT_ vs renderButton

MainsailSoftware 22 Apr, 2016
I have a ChronoConnectivity connection in which I use the following to create an Add button displayed using the Front-end header code:


$drawUrl = "index.php?option=com_chronoconnectivity5&cont=lists&ccname=CruiseAttendeeListMgr&act=edit";
$drawImage = $this->view->Assets->image('add', 'toolbar/');
echo $this->view->Toolbar->renderButton("add",$drawUrl,"Add Attendee",$drawImage);


I also use _EDIT_ to display an Edit link for each of the records.

Each one produces different HTML code:


_EDIT_ produces an <a> tag with this href value:
href="/joomla/index.php/home/manage-cruises?cont=lists&ccname=CruiseAttendeeListMgr&act=edit&gcb=456"

renderButton produces the following:
<button type="button" id="toolbar-button-add" data-url="index.php?option=com_chronoconnectivity5&cont=lists&ccname=CruiseAttendeeListMgr&act=edit" class="toolbar-button">Add Attendee</button>


The both obviously call the same CFv5 Form, but using different URLs. The front-end template uses a three column display configuration: Menu items on the left, the main article in the center and a stack of modules down the right-hand side.

The problem am having is that I have configured the CCv5 front-end display, using a hidden menu items, to not display the right-hand side modules. This works fine when clicking on the _EDIT_ generated link; the modules are hidden.

But when I click on the renderButton generated button, it displays the CFv5 form as expected in the center position, but all the should be hidden modules are present on the right-hand side.

I have created a hidden menu item for the CCv5 connection, and a separate one for the CFv5 form.

I swear this was working fine before I upgraded to Joomla! 3.5.x, but I cannot be certain.

What to I need to do to get the Add and Edit displays of the shared CFv5 form to both hide the right-han
GreyHead 22 Apr, 2016
Hi MainsailSoftware,

I guess that you could change the menu options so that your modules are hidden by default and only displayed on specific menu items.

The CC problem seems to be because the edit link is using a Menu URL root (albeit that it looks more like a path than a URL).- index.php/home/manage-cruises - while the renderButton URL is a standard Joomla! URL index.php?option=com_chronoconnectivity5&cont=lists&ccname=CruiseAttendeeListMgr&act=edit

Can you replace the renderButton URL with index.php/home/manage-cruises?act=edit ??

Bob
MainsailSoftware 22 Apr, 2016
Answer
1 Likes
I originally tried putting the URL generated by _EDIT_ in the renderButton URL parameter, but received a "404 Category Not Found" error. I received the same when trying what you suggested:

[attachment=0]404 Category Not Found.PNG[/attachment]

But I didn't give up... I started trying multiple variants as I was sure it would eventually work... you had me on the right track.

I used my Chrome browser's element inspector which allows you to change values on the fly. I also observed what was actually being used in the browser's address bar.

Here is what eventually worked (so far after preliminary testing):


        $drawUrl = "/joomla/index.php/home/manage-cruises?cont=lists&ccname=CruiseAttendeeListMgr&act=edit";
        $drawImage = $this->view->Assets->image('add', 'toolbar/');
        echo $this->view->Toolbar->renderButton("add",$drawUrl,"Add Attendee",$drawImage);


Thanks for the help,

Jim
GreyHead 22 Apr, 2016
Hi JIm,

Well done and thanks for posting the answer.

Bob
This topic is locked and no more replies can be posted.