It would be nice for modules to be able to provide custom items for the pane drowdown links.

Patch coming up ...

Comments

gielfeldt’s picture

Status:Active» Needs review
StatusFileSize
new1.01 KB
merlinofchaos’s picture

Status:Needs review» Needs work

Since there are 3 categories of links, I think we need to do this correctly and allow it for all of them rather than just 1 category.

gielfeldt’s picture

Hi

Thanks. I'll further into it.

gielfeldt’s picture

Status:Needs work» Needs review
StatusFileSize
new8.54 KB

I've refactored the get_pane_links() a bit, so that the data-set needed for the ctools_dropdown isn't too mixed with the concept if the pane links and their categories. Perhaps the separation of the links and categorization could be separated even further from the presentation, but maybe that's overkill?

As proof-of-concept, I've also added an "Edit mini panel" link which I find quite useful (and which is the main reason for this patch).

MiSc’s picture

Status:Needs review» Reviewed & tested by the community

Tested and worked fine - really like the addition of editing the mini panels direct.

sergiu.savva’s picture

Status:Reviewed & tested by the community» Needs review
StatusFileSize
new11.98 KB
new66.99 KB

Hi gielfeldt,
Works great!

Suggestion:
pane_links.png

When we have keys, is more easily to change array.

<?php
/**
 * Implements hook_get_pane_links_alter().
 */
function my_module_get_pane_links_alter(&$links, $pane, $content_type){
 
$links['top']['disabled']['title'] = t("Hide");
}
?>
gmclelland’s picture

Status:Reviewed & tested by the community» Needs review

Tested the patch in #6 in combination with #1948278: Get an edit link for the view panes in Page Manger. Everything worked great. I was able to edit Mini panels and Views.

MiSc’s picture

Status:Needs review» Reviewed & tested by the community

Mark as reviewed and tested as for comment #7.

gmclelland’s picture

Status:Needs review» Reviewed & tested by the community

It would be sweet if we could also edit Custom Content Panes with this.

gmclelland’s picture

Here is a patch to add the edit link for custom content panes.

gmclelland’s picture

Sorry, here is an updated patch based on #10 that fixes Notice: Undefined index error.

Note: This patch needs to be applied to the ctools module to get the "Edit custom content pane" link in the dropdown links when editing a page using the Panels Standard Editor.

Hope this helps someone

jenlampton’s picture

@gmclelland can you please open an issue against ctools and post your new patch there? This issue is for the RTBC patch in #6 - that one's against panels.

gmclelland’s picture

@jenlampton - Agreed, here you go #2108413: Add edit link for custom content panes

japerry’s picture

Issue summary:View changes
Status:Reviewed & tested by the community» Fixed

Fixed!

http://drupalcode.org/project/panels.git/commit/c12191a

The ctools portion is in the sandbox for 1.4 and will be added before release.

gielfeldt’s picture

Awesome! .... 2 years?!? :-)

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit c12191a on 7.x-3.x, 8.x-3.x authored by gielfeldt, committed by japerry:
    Issue #1400884 by gielfeldt, sergiu.savva: Custom menu items in pane...