11

As the official doc says you can do something like panels-pane_node-title.tpl.php panels-pane_panel_node_title.tpl.php panels-pane-node-title.tpl.php panels-pane-node_title.tpl.php After some search i have found that the suggestions are not detecting by panels, and i end up in this preprocess function. function ...


8

This should be possible by invoking Drupal.CTools.Modal.show directly. The function takes one argument (the modal-style), which either can be a string pointing to an object on Drupal.settings or the style-object itself. After showing the dialog, it is possible to populate title and content using jQuery: Drupal.CTools.Modal.show('my-modal-style'); $('#modal-...


8

Assuming you already have the node override Panel enabled: Edit the panel page for the node override (node_view for node/%node) Make a new variant, enable selection rules For the selection rule, choose String: Url Path In the criteria, keep Allow access on the following pages selected In the textarea, add the internal node paths for this nid(s) you want. ...


7

Check out this new feature from the latest dev version of Drush 8.x-6.x: $ drush @dev pm-list --format=csv Administration,Actions permissions (VBO) (actions_permissions),Module,Not installed,7.x-3.1 Administration,Administration Development tools (admin_devel),Module,Not installed,7.x-3.0-rc4 Administration,Administration menu (admin_menu),Module,Enabled,7....


7

My final solution was to create a Page Panel with the following path: shop/%product/!optionalArgs % indicates a required argument, ! indicates an optional argument In order to grab all of the "arguments" or URL path after the product (ex: barn), go to Settings » Arguments, select Settings for optionalArgs, and make sure Get all arguments after this one is ...


7

Session variables seem to be the way to go Don't forget that session variables rely on cookies Have I missed any options? The traditional solution would be to use the ip address as a fallback if cookies are disabled. PHP does support an alternative to cookie-based sessions -- it can rewrite the URLs to include "?PHPSESSID=xyz". However, securing this ...


6

mymodule.module: <?php /** * Implements hook_ctools_plugin_api(). */ function mymodule_ctools_plugin_api() { list($module, $api) = func_get_args(); if ($module == 'mymodule' && ($api == 'plugins')) { return array('version' => 1.0); } } /** * Implements hook_ctools_plugin_type(). */ function mymodule_ctools_plugin_type(...


6

You should try to put this line: form_load_include($form_state, 'inc', 'my_module','plugins/content_types/my_file'); at the top of your content_image_pane_edit_form function, replacing my_module and my_file with your module and plugin include file. Ctools panes are generated in a separate modal from base Drupal forms and so when the AJAX reloads the form ...


5

In the image below, one can see the Context settings for a particular Page variant. Under Contexts, one can also see Relationships. Relationships are what one uses to tell Page manager to pull in more, related, data, based on the arguments that the page is built around. With two nodes related to each other with a reference field, and the base node being ...


5

We can achieve this quite easily by using node_view as a guide. First though you must implement hook_ctools_plugin_directory() in your module file to register the ctools plugins: /** * Implements hook_ctools_plugin_directory(). */ function my_entity_ctools_plugin_directory($owner, $plugin_type) { if ($owner == 'page_manager' || $owner == 'ctools' || $...


5

Even faster: PHP is not even needed to just display all values... Under "When the filter value IS available or a default is provided Tick "Specify validation criteria" Choose 'Basic validation' Under "Action to take if filter value does not validate", choose "Display all values"


5

See the API documentation: The correct way to declare the version is by the major number only (i.e. an integer) not the entire version as a string. // code included in my_module.module function my_module_views_api() { return array('api' => 3); }


5

There are no ctools plugins anymore in Drupal 8. There's just the Drupal 8 plugin API. Page Manager, Panels and so on use standard block plugins now in 8.x, so you basically have to port this to a block an then it should work fine. Also, the "code" you posted only defines that you have such a plugin in your module, nothing else. If you need more specific ...


4

I found a better explanation here so I'm not going to explain much about the $form_state itself here. To present a form, you have to use drupal_get_form() function that returns a render-able array of the form. To build the form, you need to give a form ID (to get the form API arrays) and the state of the form. Form State ($form_state) becomes handy when ...


4

I doubt it, that would be re-inventing the wheel IMO...what you're describing is pretty much what jQuery is for. Consider this code, which is a basic representation of what you're trying to do: $(function() { $('#some-element').bind('someEvent', function() { $('#some-other-element').val(''); }); }); That's only 3 meaningful lines of code, and is so ...


4

I'll give this a shot. A view mode is a concept that exists for entities. A node has for example the view modes Full content, Teaser and RSS. And as you say different view modes can have different settings. An image might be just an URL in the RSS view mode and a large rendered image in the Full content view mode. It is also possible to have different order ...


4

A view mode is an entity specific concept. It defines how to render a, which could for example determine which fields are displayed and how, but nothing prevents a view mode of a "gallery image" to pull in and render a View that shows the other images in the same gallery for example. A style plugin, as a Panels specific concept, does a similar thing to view ...


4

The /contact page is provided by the Contact module, which you must have enabled. It displays the contact_site_form form, which is declared in /modules/contact/contact.pages.inc. Configuration options for this form can be found at the site.com/admin/structure/contact URL. If you're looking to change form structure, you may need to create a custom module ...


4

It looks like you might want to use views>advanced>other aggregation to make the posts distinct on the author field. Summary Create a view of nodes that displayed recent posts by selected authors, then ensure that each author did not repeat by making them distinct. To allow the site administrators (or other users by role) to select authors I would ...


4

You can use views_embed_view e.g print views_embed_view('news', 'panel_pane_1', 'world'); Any additional parameters will be passed as arguments, i.e contextual filter values.


4

I think the simplest way would be to change your path to incorporate the nid, e.g. function MYMODULE_menu() { $items['mymodule/%ctools_js/modals/%node'] = array( 'title' => 'Title', 'page callback' => 'MYMODULE_callback', 'page arguments' => array(1, 3), ... ); return $items; } Change the path in the link $build['links']['...


4

Form API and Ajax frameworks work quite well together. In your submit button, that you want to trigger the popup, it should work as an Ajax element first. $form['submit'] = array( '#type' => 'submit', '#value' => 'Submit (and open popup)', ); If you use submit and validate handlers as you have shown in your question, those submit and validate ...


4

That directory must be writable by the usre that runs the web server (apache, for example). So you have to: go to admin/config/media/file-system and check the path of public files (may be sites/default/files) check which user runs web server (on Ubuntu could be "www-data", on centos/fedora/redhat could be "apache") using a terminal go to the document root ...


3

It's a good question, and some further information can be found in the ctools help file context-content.html The CTools pluggable content system provides various pieces of content as discrete bits of data that can be added to other applications, such as Panels or Dashboard via the UI. Whatever the content is added to stores the configuration for ...


3

There is a great and simple example on how to do this in the ctools_ajax_sample module (in the CTools suite). As it has been pointed out, the key is to use the function ctools_content_render(). The example shows how to populate the arguments of the function, although you obviously have to customize it according to your needs. This thread in Drupal Groups ...


3

The magic function is ctools_context_keyword_substitute The key to getting this working is to make sure that you use the all contexts flag in your plugin configuration. $plugin = array( 'single' => TRUE, 'title' => t('Instagram'), 'category' => t('Content'), 'all contexts' => TRUE, ); /** * Render the custom content type. */ ...


3

You should pass the context in and use the once() function to make sure your events are only bound once, and in the right context. Something like: (function($, Drupal) { Drupal.behaviors.ukgproducts = { attach: function(context, settings) { $('h2', context).once('myaccordian').click(function(e) { e.preventDefault(); $(this)....


3

Here's the piece I was missing: /** * Implementation hook_ctools_plugin_api(). * * Makes module compatible with context 3. */ function MY_MODULE_ctools_plugin_api($module, $api) { if ($module == 'context' && ($api == 'plugins' || $api == 'context')) { return array('version' => 3); } }


3

I figured out two ways to do this. First way It requires that any style plugins you want to filter be provided by the module in which you're doing the filtering (unless you want to hand-code in a list of modules or something), and named such that the machine name includes the name(s) of the content type(s) of the panes on which it should be able to be ...


3

You must use $form_state to do it. $form_state['build_info']['args'] = array($node); function generate_tpls_callback($cid, $ajax) { if ($ajax) { ctools_include('ajax'); ctools_include('modal'); $form_state = array( 'ajax' => TRUE, 'title' => t('Display box to change title'), 'cid' =>...


Only top voted, non community-wiki answers of a minimum length are eligible