http://m.getsatisfaction.com/tags/1225273/topics?page=1 Topics tagged with _displaysubpanels 1970-01-01T00:00:00Z 2 1 0 1 0 0 http://m.getsatisfaction.com/topics/6074010 6074010 How do I keep the subpanel top button hidden AFTER quick create was used? 2014-04-07T06:21:15Z 2014-04-03T13:04:49Z Adam Głębowicz http://m.getsatisfaction.com/people/6782508 https://www.gravatar.com/avatar/2d80842775b0de2d12723ba5611a8594?d=identicon&s=55&r=PG adam_g_bowicz Hello,<br /><br />I've conditionally hidden the "Select" top button in a subpanel by creating a custom view.detail.php file, adding the _displaySubpanels() function and inside it some business logic that hides the button like below:<br />unset($subpanel-&gt;subpanel_definitions-&gt;layout_defs['subpanel_setup']['...']['top_buttons'][1]);<br /><br />It's clean and it works fine, until I add a new record in the subpanel using the Quick Create form and Save.<br />The&nbsp;_displaySubpanels() function doesn't get called, and the subpanel refreshes with both the Create and Select buttons visible.<br /><br />Is there a way to keep the button hidden after Quick Create form is saved?&nbsp;<br />I know you could do this in a custom Layoutdefs file, but would like to keep this and the business logic in the custom views folder.<br /> question 2 2 1 comment _displaysubpanels, quick create, select button, subpanel http://m.getsatisfaction.com/topics/6037910 6037910 require_once SubPanelTiles.php on _displaySubPanels() fails 2014-03-17T17:04:40Z 2014-03-17T16:38:32Z gperez http://m.getsatisfaction.com/people/6676331 https://d2r1vs3d9006ap.cloudfront.net/public/uploaded_images/10340886/ranita_400x400_medium.jpg gperez I need to hide the "create" button for a couple of subpanels. So I do this (as I read somewhere in the forum)<br /><pre><br />function _displaySubPanels()&nbsp; &nbsp; {<br /> require_once ('/include/SubPanel/SubPanelTiles&#46;php'); <br /> $subpanel = new SubPanelTiles($this-&gt;bean, $this-&gt;module);<br /> &#47;&#47; remove Create buttons for Planet and Woocommerce payment modules<br /> unset($subpanel-&gt;subpanel_definitions-&gt;layout_defs['subpanel_setup']['oasis_resersiswoocommerce']['top_buttons'][0]);&nbsp;<br /> unset($subpanel-&gt;subpanel_definitions-&gt;layout_defs['subpanel_setup']['ipay_ipay_os_reservations']['top_buttons'][0]);&nbsp;<br /><br /> echo $subpanel-&gt;display();<br />}<br /></pre> This works fine in localhosts (In mine and in other developer's environment). However it crashes silently when uploaded to the testing server. No error in the logs, but the subpanels stopped appearing and also the footer.&nbsp;<br /><br />Things get better if I call:&nbsp;<br /><pre>parent::_displaySubPanels();</pre>Now the footer appears, but the subpanels are still missing. What's going on?&nbsp;<br /><br />I found that the problematic line is this:&nbsp;<br /><pre>require_once ('/include/SubPanel/SubPanelTiles&#46;php'); </pre>Why including that file would cause problems? problem complete 1 0 1 create _displaysubpanels, subpanels, subpaneltiles