5 * Holds the panels pages export.
9 * Implements hook_default_panel_pages()
11 function ctools_plugin_example_default_panel_pages() {
12 $page = new
stdClass();
15 $page->name
= 'ctools_plugin_example_demo_panel';
16 $page->title
= 'Panels Plugin Example Demo Panel';
17 $page->access
= array();
18 $page->path
= 'demo_panel';
19 $page->load_flags
= 1;
21 $page->arguments
= array(
24 'name' => 'simplecontext_arg',
28 'identifier' => 'Simplecontext arg',
29 'keyword' => 'simplecontext',
32 $page->relationships
= array(
35 'context' => 'argument_simplecontext_arg_1',
36 'name' => 'relcontext_from_simplecontext',
38 'identifier' => 'Relcontext from Simplecontext',
39 'keyword' => 'relcontext',
42 $page->no_blocks
= '0';
43 $page->switcher_options
= array();
45 $page->contexts
= array();
46 $display = new
ctools_display();
47 $display->did
= 'new';
48 $display->layout
= 'threecol_33_34_33_stacked';
49 $display->layout_settings
= array();
50 $display->panel_settings
= array();
51 $display->content
= array();
52 $display->panels
= array();
53 $pane = new
stdClass();
55 $pane->panel
= 'left';
56 $pane->type
= 'custom';
58 $pane->subtype
= 'custom';
59 $pane->access
= array();
60 $pane->configuration
= array(
62 'override_title' => 0,
63 'override_title_text' => '',
66 'title' => '"No Context Item"',
67 'body' => 'The "no context item" content type is here to demonstrate that you can create a content_type that does not require a context. This is probably the same as just creating a custom php block on the fly, and might serve the same purpose.',
70 $pane->cache
= array();
71 $display->content
['new-1'] = $pane;
72 $display->panels
['left'][0] = 'new-1';
73 $pane = new
stdClass();
75 $pane->panel
= 'left';
76 $pane->type
= 'no_context_item';
78 $pane->subtype
= 'description';
79 $pane->access
= array();
80 $pane->configuration
= array(
82 'override_title' => 0,
83 'override_title_text' => '',
90 $pane->cache
= array();
91 $display->content
['new-2'] = $pane;
92 $display->panels
['left'][1] = 'new-2';
93 $pane = new
stdClass();
95 $pane->panel
= 'middle';
96 $pane->type
= 'custom';
98 $pane->subtype
= 'custom';
99 $pane->access
= array();
100 $pane->configuration
= array(
101 'style' => 'default',
102 'override_title' => 0,
103 'override_title_text' => '',
106 'title' => 'Simplecontext',
107 'body' => 'The "Simplecontext" content and content type demonstrate a very basic context and how to display it.
109 Simplecontext includes configuration, so it can get info from the config. It can also get its information to run from a simplecontext context, generated either from an arg to the panels page or via explicitly adding a context to the page.',
112 $pane->cache
= array();
113 $display->content
['new-3'] = $pane;
114 $display->panels
['middle'][0] = 'new-3';
115 $pane = new
stdClass();
116 $pane->pid
= 'new-4';
117 $pane->panel
= 'middle';
118 $pane->type
= 'simplecontext_item';
120 $pane->subtype
= 'description';
121 $pane->access
= array(
125 $pane->configuration
= array(
126 'context' => 'argument_simplecontext_arg_1',
127 'style' => 'default',
128 'override_title' => 0,
129 'override_title_text' => '',
132 'config_item_1' => 'simplecontext called from arg',
134 $pane->cache
= array();
135 $display->content
['new-4'] = $pane;
136 $display->panels
['middle'][1] = 'new-4';
137 $pane = new
stdClass();
138 $pane->pid
= 'new-5';
139 $pane->panel
= 'right';
140 $pane->type
= 'custom';
142 $pane->subtype
= 'custom';
143 $pane->access
= array();
144 $pane->configuration
= array(
145 'style' => 'default',
146 'override_title' => 0,
147 'override_title_text' => '',
150 'title' => 'Relcontext',
151 'body' => 'The relcontext content_type gets its data from a relcontext, which is an example of a relationship. This panel should be run with an argument like "/xxx", which allows the simplecontext to get its context, and then the relcontext is configured in this panel to get (create) its data from the simplecontext.',
154 $pane->cache
= array();
155 $display->content
['new-5'] = $pane;
156 $display->panels
['right'][0] = 'new-5';
157 $pane = new
stdClass();
158 $pane->pid
= 'new-6';
159 $pane->panel
= 'right';
160 $pane->type
= 'relcontext_item';
162 $pane->subtype
= 'description';
163 $pane->access
= array();
164 $pane->configuration
= array(
165 'context' => 'relationship_relcontext_from_simplecontext_1',
166 'style' => 'default',
167 'override_title' => 0,
168 'override_title_text' => '',
171 'config_item_1' => 'default1',
173 $pane->cache
= array();
174 $display->content
['new-6'] = $pane;
175 $display->panels
['right'][1] = 'new-6';
176 $pane = new
stdClass();
177 $pane->pid
= 'new-7';
178 $pane->panel
= 'top';
179 $pane->type
= 'custom_php';
181 $pane->subtype
= 'custom_php';
182 $pane->access
= array();
183 $pane->configuration
= array(
184 'style' => 'default',
185 'override_title' => 0,
186 'override_title_text' => '',
190 'body' => '$arg = arg(1);
193 $block->content = <<<END
194 <em>This page is intended to run with an arg and you don\'t have one.</em>
196 Without an arg, the page doesn\'t have any context.
197 <br />Please try something like "/$arg0/xxx"
200 $block->title = "This is intended to run with an argument";
202 $block->content = "The arg for this page is \'$arg\'";
205 $pane->cache
= array();
206 $display->content
['new-7'] = $pane;
207 $display->panels
['top'][0] = 'new-7';
208 $page->display
= $display;
209 $page->displays
= array();
210 $pages['ctools_plugin_example'] = $page;