Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By chowdah on
I have a Zen based theme with a bunch of different tpl files for different content types. I have successfully created a working mini-panel based on a view that I only want to display in one of the content types, and can get the mini panel to output using the Blocks interface. My problem is that the blocks interface is limited in it's ability to place the panel where I would like it to go (above the output of the tags at the bottom of the node), and I am thinking that the best route would be to insert the mini-panel into the output through the .tpl
Is there an easy (or any) way to do this?
Comments
To answer my own question,
To answer my own question, embedding the mini panel as a block works:
The Arguments for the module_invoke are as follows:
You can get the name of the mini panel from the Blocks ui by hovering over the 'configure' link for the mini panel and reading the last part (after the last slash) of the link in the status bar. 'panels_mini' is the name of the module that created the block (info extracted as above - except the module name is what falls between the 2nd to last and last slashes in the url).
Drupal 7 version
The following works in Drupal 7:
Note how arguments 2 and 3 are collapsed into simply "block_view".
Ændrew Rininsland
News Developer and polynerd
http://www.aendrew.com
Drupal 7 - load and render mini-panel, with context
Drupal 7 - load and render mini-panel, with context:
* Note: first arg for ctools_context_create() is -- $type: The type of context to create; this loads a plugin.
For entities in general, this seems to be 'entity:ENTITY_TYPE'.
Works like a charm.
Thank you!