Its a fact, that some system path f.ex. /forum will not work together with panels.

Be cause I have defined several custom styles in panels, I would like to theme blocks and nodes on non-panel pages with the styles of the panels module.

Until now, I did not found a good solution how to create panels programmatically.

I was able to emulate panels by executing the following code in template.php

    //CSS for rounded corners
    panels_load_include('rounded_corners','plugins/styles/corners/' );
    $display = new stdClass();
    panels_rounded_corners2_css($display);
    //reload css files
    $vars['css'] = drupal_add_css();

But this is a hack and not a valuable solution.

This code includes the necessary css styles but I'm sure, there must be an easy way to reuse panels on normal system pages.

Any hints?

Comments

ayalon’s picture

I forgot one part:

In the template code I use this code to render the page content:

        //fake panels
        panels_load_include('common');
        panels_load_include('display-render');
        panels_load_include('plugins');
      
        $contentpage = new stdClass();
        $contentpage->content =  $tabs.$content;
        $contentpage->feeds = $feed_icons;
        $contentpage->title = $title;
        $contentpage->type = 'block';
      
        $pane = new stdClass();
        $pane->style['style'] ='rounded_corners';
        
        print panels_render_pane($contentpage, $pane, $display);

merlinofchaos’s picture

Status: Active » Fixed

Panels Everywhere module now does this.

Status: Fixed » Closed (fixed)

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