added custom layout to panles, created thematique anchor links menu

This commit is contained in:
2017-02-07 17:38:51 +01:00
parent e2b8a1ae80
commit 46db2145e5
25 changed files with 495 additions and 67 deletions
@@ -24,17 +24,17 @@ function admin_default_Workflow() {
"(creation)" : {"weight":"-50","sysid":"1","state":"(creation)","status":"1","name":"(creation)"},
"brouillon" : {"weight":"-20","sysid":"0","state":"Brouillon","status":"1","name":"brouillon"},
"en_attente" : {"weight":"-20","sysid":"0","state":"En attente","status":"1","name":"en_attente"},
"publi\\u00e9" : {"weight":"-20","sysid":"0","state":"Publi\\u00e9","status":"1","name":"publi\\u00e9"}
"publie" : {"weight":"-20","sysid":"0","state":"Publi\\u00e9","status":"1","name":"publie"}
},
"transitions" : {
"_creation_to_brouillon" : {"roles":{"-1":"-1"},"name":"_creation_to_brouillon","label":"","start_state":"(creation)","end_state":"brouillon"},
"_creation_to_en_attente" : {"roles":[],"name":"_creation_to_en_attente","label":"","start_state":"(creation)","end_state":"en_attente"},
"_creation_to_publi\\u00e9" : {"roles":[],"name":"_creation_to_publi\\u00e9","label":"","start_state":"(creation)","end_state":"publi\\u00e9"},
"_creation_to_publie" : {"roles":[],"name":"_creation_to_publie","label":"","start_state":"(creation)","end_state":"publie"},
"brouillon_to_en_attente" : {"roles":{"-1":"-1"},"name":"brouillon_to_en_attente","label":"","start_state":"brouillon","end_state":"en_attente"},
"en_attente_to_brouillon" : {"roles":{"-1":"-1"},"name":"en_attente_to_brouillon","label":"","start_state":"en_attente","end_state":"brouillon"},
"en_attente_to_publi\\u00e9" : {"roles":{"-1":"-1"},"name":"en_attente_to_publi\\u00e9","label":"","start_state":"en_attente","end_state":"publi\\u00e9"},
"publi\\u00e9_to_brouillon" : {"roles":{"-1":"-1"},"name":"publi\\u00e9_to_brouillon","label":"","start_state":"publi\\u00e9","end_state":"brouillon"},
"publi\\u00e9_to_en_attente" : {"roles":{"-1":"-1"},"name":"publi\\u00e9_to_en_attente","label":"","start_state":"publi\\u00e9","end_state":"en_attente"}
"en_attente_to_publie" : {"roles":{"-1":"-1"},"name":"en_attente_to_publie","label":"","start_state":"en_attente","end_state":"publie"},
"publie_to_brouillon" : {"roles":{"-1":"-1"},"name":"publie_to_brouillon","label":"","start_state":"publie","end_state":"brouillon"},
"publie_to_en_attente" : {"roles":{"-1":"-1"},"name":"publie_to_en_attente","label":"","start_state":"publie","end_state":"en_attente"}
},
"label" : "Publication",
"typeMap" : [ "documentair", "episode", "page", "thematique" ],
@@ -73,6 +73,9 @@ function admin_user_default_permissions() {
$permissions['access devel information'] = array(
'name' => 'access devel information',
'roles' => array(
'administrator' => 'administrator',
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
'root' => 'root',
),
'module' => 'devel',
@@ -63,28 +63,28 @@ function admin_workflow_access_features_default_settings() {
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['publié'] = array();
$workflows['Publication']['publié']['workflow_features_author_name'] = array(
$workflows['Publication']['publie'] = array();
$workflows['Publication']['publie']['workflow_features_author_name'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['publié']['anonymous user'] = array(
$workflows['Publication']['publie']['anonymous user'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['publié']['authenticated user'] = array(
$workflows['Publication']['publie']['authenticated user'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['publié']['administrator'] = array(
$workflows['Publication']['publie']['administrator'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 0,
);
$workflows['Publication']['publié']['root'] = array(
$workflows['Publication']['publie']['root'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
@@ -986,7 +986,7 @@ function admin_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'pathauto_transliterate';
$strongarm->value = FALSE;
$strongarm->value = 1;
$export['pathauto_transliterate'] = $strongarm;
$strongarm = new stdClass();
@@ -0,0 +1,43 @@
<?php
/**
* @file
* clameurs.features.fe_block_settings.inc
*/
/**
* Implements hook_default_fe_block_settings().
*/
function clameurs_default_fe_block_settings() {
$export = array();
$export['version'] = '2.0';
$export['clameursmod-thematiques-anchor-links'] = array(
'cache' => -1,
'custom' => 0,
'delta' => 'thematiques-anchor-links',
'i18n_mode' => 0,
'module' => 'clameursmod',
'node_types' => array(),
'pages' => '',
'roles' => array(),
'themes' => array(
'adminimal' => array(
'region' => '',
'status' => 0,
'theme' => 'adminimal',
'weight' => 0,
),
'clameurs' => array(
'region' => '',
'status' => 0,
'theme' => 'clameurs',
'weight' => 0,
),
),
'title' => '',
'visibility' => 0,
);
return $export;
}
@@ -2,12 +2,14 @@ name = Clameurs
core = 7.x
package = Clameurs
dependencies[] = cer
dependencies[] = clameursmod
dependencies[] = clone
dependencies[] = ctools
dependencies[] = ctools_custom_content
dependencies[] = domwindow
dependencies[] = entity
dependencies[] = entityreference
dependencies[] = fe_block
dependencies[] = features
dependencies[] = field_extrawidgets
dependencies[] = field_group
@@ -23,6 +25,7 @@ dependencies[] = options
dependencies[] = page
dependencies[] = page_manager
dependencies[] = panels
dependencies[] = panels_extra_styles
dependencies[] = panels_mini
dependencies[] = rules
dependencies[] = strongarm
@@ -45,6 +48,7 @@ features[ctools][] = field_group:field_group:1
features[ctools][] = page_manager:pages_default:1
features[ctools][] = panels_mini:panels_default:1
features[ctools][] = strongarm:strongarm:1
features[fe_block_settings][] = clameursmod-thematiques-anchor-links
features[features_api][] = api:2
features[field_base][] = cer_bidirectional
features[field_base][] = cer_enabled
@@ -167,6 +171,7 @@ features[variable][] = node_submitted_thematique
features[variable][] = pathauto_node_documentair_pattern
features[variable][] = pathauto_node_episode_pattern
features[variable][] = pathauto_node_thematique_pattern
features[variable][] = pathauto_taxonomy_term_actions_pattern
features[variable][] = workflow_documentair
features[variable][] = workflow_episode
features[variable][] = workflow_thematique
@@ -42,7 +42,7 @@ function clameurs_default_page_manager_pages() {
'contexts' => array(
0 => array(
'identifier' => 'T1',
'keyword' => 'node',
'keyword' => 'node_1',
'name' => 'entity:node',
'entity_id' => '3',
'id' => 1,
@@ -87,12 +87,12 @@ function clameurs_default_page_manager_pages() {
'name' => 'panneau',
);
$display = new panels_display();
$display->layout = 'onecol';
$display->layout = 'column';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
'default' => NULL,
'middle' => NULL,
'default' => NULL,
),
'style' => 'naked',
);
@@ -137,6 +137,75 @@ function clameurs_default_page_manager_pages() {
$display->content['new-047092b0-9489-436d-879b-704fc543bf86'] = $pane;
$display->panels['middle'][0] = 'new-047092b0-9489-436d-879b-704fc543bf86';
$pane = new stdClass();
$pane->pid = 'new-4151eebf-62c3-4502-bfa0-0da5af08cfd1';
$pane->panel = 'middle';
$pane->type = 'block';
$pane->subtype = 'clameursmod-thematiques-anchor-links';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_title' => 1,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => array(
'title' => array(
'prefix' => '',
'suffix' => '',
),
'content' => array(
'prefix' => '<nav id="thematique-anchor-links">',
'suffix' => '</nav>',
),
'theme' => 0,
),
'style' => 'wrapper_raw',
);
$pane->css = array();
$pane->extras = array();
$pane->position = 1;
$pane->locks = array();
$pane->uuid = '4151eebf-62c3-4502-bfa0-0da5af08cfd1';
$display->content['new-4151eebf-62c3-4502-bfa0-0da5af08cfd1'] = $pane;
$display->panels['middle'][1] = 'new-4151eebf-62c3-4502-bfa0-0da5af08cfd1';
$pane = new stdClass();
$pane->pid = 'new-5404a1db-19ad-4398-867f-89709b468f22';
$pane->panel = 'middle';
$pane->type = 'views';
$pane->subtype = 'thematiques_anchors_menu';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'override_pager_settings' => 0,
'use_pager' => 0,
'nodes_per_page' => '',
'pager_id' => '0',
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'default',
'override_title' => 0,
'override_title_text' => '',
'override_title_heading' => 'h2',
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->locks = array();
$pane->uuid = '5404a1db-19ad-4398-867f-89709b468f22';
$display->content['new-5404a1db-19ad-4398-867f-89709b468f22'] = $pane;
$display->panels['middle'][2] = 'new-5404a1db-19ad-4398-867f-89709b468f22';
$pane = new stdClass();
$pane->pid = 'new-698583ec-031d-4b04-a42e-af1c315bde56';
$pane->panel = 'middle';
$pane->type = 'panels_mini';
@@ -145,7 +214,7 @@ function clameurs_default_page_manager_pages() {
$pane->access = array();
$pane->configuration = array(
'context' => array(
0 => 'empty',
0 => 'context_entity:node_1',
),
'override_title' => 0,
'override_title_text' => '',
@@ -153,19 +222,19 @@ function clameurs_default_page_manager_pages() {
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
'style' => 'naked',
'settings' => NULL,
);
$pane->css = array(
'css_id' => '',
'css_class' => 'thematique',
'css_class' => '',
);
$pane->extras = array();
$pane->position = 1;
$pane->position = 3;
$pane->locks = array();
$pane->uuid = '698583ec-031d-4b04-a42e-af1c315bde56';
$display->content['new-698583ec-031d-4b04-a42e-af1c315bde56'] = $pane;
$display->panels['middle'][1] = 'new-698583ec-031d-4b04-a42e-af1c315bde56';
$display->panels['middle'][3] = 'new-698583ec-031d-4b04-a42e-af1c315bde56';
$pane = new stdClass();
$pane->pid = 'new-00e0d860-0d91-4a9a-b8c6-c8021d74d438';
$pane->panel = 'middle';
@@ -188,11 +257,11 @@ function clameurs_default_page_manager_pages() {
);
$pane->css = array();
$pane->extras = array();
$pane->position = 2;
$pane->position = 4;
$pane->locks = array();
$pane->uuid = '00e0d860-0d91-4a9a-b8c6-c8021d74d438';
$display->content['new-00e0d860-0d91-4a9a-b8c6-c8021d74d438'] = $pane;
$display->panels['middle'][2] = 'new-00e0d860-0d91-4a9a-b8c6-c8021d74d438';
$display->panels['middle'][4] = 'new-00e0d860-0d91-4a9a-b8c6-c8021d74d438';
$pane = new stdClass();
$pane->pid = 'new-fe463245-7772-4af9-acf1-a58504d02a9a';
$pane->panel = 'middle';
@@ -215,11 +284,11 @@ function clameurs_default_page_manager_pages() {
);
$pane->css = array();
$pane->extras = array();
$pane->position = 3;
$pane->position = 5;
$pane->locks = array();
$pane->uuid = 'fe463245-7772-4af9-acf1-a58504d02a9a';
$display->content['new-fe463245-7772-4af9-acf1-a58504d02a9a'] = $pane;
$display->panels['middle'][3] = 'new-fe463245-7772-4af9-acf1-a58504d02a9a';
$display->panels['middle'][5] = 'new-fe463245-7772-4af9-acf1-a58504d02a9a';
$pane = new stdClass();
$pane->pid = 'new-3bcabce9-5d73-4bca-a37a-c541cfd1bec5';
$pane->panel = 'middle';
@@ -242,11 +311,11 @@ function clameurs_default_page_manager_pages() {
);
$pane->css = array();
$pane->extras = array();
$pane->position = 4;
$pane->position = 6;
$pane->locks = array();
$pane->uuid = '3bcabce9-5d73-4bca-a37a-c541cfd1bec5';
$display->content['new-3bcabce9-5d73-4bca-a37a-c541cfd1bec5'] = $pane;
$display->panels['middle'][4] = 'new-3bcabce9-5d73-4bca-a37a-c541cfd1bec5';
$display->panels['middle'][6] = 'new-3bcabce9-5d73-4bca-a37a-c541cfd1bec5';
$pane = new stdClass();
$pane->pid = 'new-eaddcc28-d241-456b-a324-fc9838804350';
$pane->panel = 'middle';
@@ -269,11 +338,11 @@ function clameurs_default_page_manager_pages() {
);
$pane->css = array();
$pane->extras = array();
$pane->position = 5;
$pane->position = 7;
$pane->locks = array();
$pane->uuid = 'eaddcc28-d241-456b-a324-fc9838804350';
$display->content['new-eaddcc28-d241-456b-a324-fc9838804350'] = $pane;
$display->panels['middle'][5] = 'new-eaddcc28-d241-456b-a324-fc9838804350';
$display->panels['middle'][7] = 'new-eaddcc28-d241-456b-a324-fc9838804350';
$pane = new stdClass();
$pane->pid = 'new-e252dc22-b3f1-4d05-84d9-652b369ced20';
$pane->panel = 'middle';
@@ -296,11 +365,11 @@ function clameurs_default_page_manager_pages() {
);
$pane->css = array();
$pane->extras = array();
$pane->position = 6;
$pane->position = 8;
$pane->locks = array();
$pane->uuid = 'e252dc22-b3f1-4d05-84d9-652b369ced20';
$display->content['new-e252dc22-b3f1-4d05-84d9-652b369ced20'] = $pane;
$display->panels['middle'][6] = 'new-e252dc22-b3f1-4d05-84d9-652b369ced20';
$display->panels['middle'][8] = 'new-e252dc22-b3f1-4d05-84d9-652b369ced20';
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = '0';
$handler->conf['display'] = $display;
@@ -28,9 +28,20 @@ function clameurs_default_panels_mini() {
),
);
$mini->contexts = array();
$mini->relationships = array();
$mini->relationships = array(
0 => array(
'identifier' => 'Entity property node:nid',
'keyword' => 'nid',
'name' => 'entity_property',
'selector' => 'nid',
'target_context' => 'integer',
'concatenator' => ',',
'context' => 'requiredcontext_entity:node_1',
'id' => 1,
),
);
$display = new panels_display();
$display->layout = 'twocol_stacked';
$display->layout = 'clameur';
$display->layout_settings = array();
$display->panel_settings = array(
'style_settings' => array(
@@ -199,7 +210,7 @@ function clameurs_default_panels_mini() {
$pane->configuration = array(
'link' => 0,
'markup' => 'h2',
'id' => '',
'id' => '%node:nid',
'class' => '',
'context' => 'requiredcontext_entity:node_1',
'override_title' => 0,
@@ -208,17 +219,20 @@ function clameurs_default_panels_mini() {
);
$pane->cache = array();
$pane->style = array(
'settings' => NULL,
'style' => 'naked',
'settings' => NULL,
);
$pane->css = array(
'css_id' => '%node:nid',
'css_class' => '',
);
$pane->css = array();
$pane->extras = array();
$pane->position = 0;
$pane->locks = array();
$pane->uuid = '5e7b0d6a-9243-4776-b535-b14d3cff1df1';
$display->content['new-5e7b0d6a-9243-4776-b535-b14d3cff1df1'] = $pane;
$display->panels['top'][0] = 'new-5e7b0d6a-9243-4776-b535-b14d3cff1df1';
$display->hide_title = PANELS_TITLE_FIXED;
$display->hide_title = PANELS_TITLE_NONE;
$display->title_pane = 'new-3d79c2a1-ab4e-4a2d-a4d6-3a3960f7ae93';
$mini->display = $display;
$export['th_matique'] = $mini;
@@ -264,9 +264,16 @@ function clameurs_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'pathauto_node_thematique_pattern';
$strongarm->value = '';
$strongarm->value = '[node:title]';
$export['pathauto_node_thematique_pattern'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'pathauto_taxonomy_term_actions_pattern';
$strongarm->value = '';
$export['pathauto_taxonomy_term_actions_pattern'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -0,0 +1,5 @@
name = Clameurs Mod
description = module for clameurs website
core = 7.x
package = "Clameurs"
dependencies[] = panels
@@ -0,0 +1,95 @@
<?php
// function clameursmod_panels_pre_render($panel, &$renderer){
// dsm($panel, 'panel');
// dsm($renderer, 'renderer');
//
// $node_ctx = $render->display['context'][0]['data'];
// dsm($node_ctx, 'node_ctx');
//
// }
/**
* Implements hook_block_info().
*/
function clameursmod_block_info() {
$blocks['thematiques-anchor-links'] = array(
'info' => t('Clameurs thematique anchor links'),
'cache' => DRUPAL_NO_CACHE
);
return $blocks;
}
/**
* Implements hook_block_view().
*/
function clameursmod_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'thematiques-anchor-links':
$block['subject'] = t('Thématique menu');
$block['content'] = _clameursmod_thematiques_anchor_links();
break;
}
return $block;
}
function _clameursmod_thematiques_anchor_links(){
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'node')
->entityCondition('bundle', 'thematique')
->propertyCondition('status', 1);
// ->propertyOrderBy('created', 'DESC');
$result = $query->execute();
$nids = array_keys($result['node']);
$nodes = [];
foreach ($nids as $nid) {
$node = node_load($nid);
$alias = drupal_get_path_alias('node/'.$nid);
// TODO: get the workflow state ID
$nodes[$nid] = array(
"alias"=>$alias,
"title"=>$node->title
);
}
return theme('thematiques_anchor_links', array("items"=>$nodes));
}
/**
* Implements hook_theme().
*/
function clameursmod_theme($existing, $type, $theme, $path) {
return array(
'thematiques_anchor_links' => array(
'render element' => 'element'
),
);
}
function theme_thematiques_anchor_links($vars){
$list = array(
'items'=>array(),
'type'=>'ul',
'attributes'=>array(
"class"=>array("thematique-anchor-links")
)
);
foreach ($vars["items"] as $nid => $val) {
// TODO: display the workflow state ID
$options = array(
"class"=>array("anchor"),
"fragment"=>$val['alias']
);
$list['items'][] = l($val['title'], '' , $options);
}
return theme('item_list', $list);
}
+30 -12
View File
@@ -76,31 +76,49 @@ body.no-sidebars #center {
#node-63 {
color: #1f04a1; }
.panel-2col-stacked {
#thematique-anchor-links {
padding: 1em 0; }
#thematique-anchor-links ul {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 0;
margin: 0; }
#thematique-anchor-links ul li {
list-style: none;
padding: 0;
margin: 0; }
#thematique-anchor-links ul li a {
color: #1f04a1;
text-decoration: none;
font-weight: 600; }
.panel-thematique {
background-position: center;
background-size: contain;
background-repeat: no-repeat; }
.panel-2col-stacked .field-name-field-emvideo img {
.panel-thematique .field-name-field-emvideo img {
width: 100%; }
.panel-2col-stacked .panel-col-top h2 {
.panel-thematique header.top h2 {
font-size: 2.5em;
font-weight: 300;
color: #fb3f08; }
.panel-2col-stacked .center-wrapper .panel-col-first {
width: 70%; }
.panel-2col-stacked .center-wrapper .panel-col-last {
width: 30%; }
.panel-2col-stacked .center-wrapper .panel-col-last .field-name-body {
display: none; }
.panel-2col-stacked .panel-col-bottom .field-name-field-episodes > .field-items {
.panel-thematique .left .field-name-body {
display: none; }
.panel-thematique .bottom .field-name-field-episodes > .field-items {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: justify;
justify-content: space-between; }
.panel-2col-stacked .panel-col-bottom .field-name-field-episodes > .field-items > .field-item {
.panel-thematique .bottom .field-name-field-episodes > .field-items > .field-item {
display: block;
width: 19%; }
.panel-2col-stacked .panel-col-bottom .field-name-body {
.panel-thematique .bottom .field-name-body {
display: none; }
#mini-panel-th_matique {
@@ -75,8 +75,28 @@ body{
color:$bleu;
}
#thematique-anchor-links{
padding:1em 0;
ul{
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
padding:0; margin:0;
li{
list-style: none;
padding:0; margin: 0;
a{
color: $bleu;
text-decoration: none;
font-weight: 600;
}
}
}
}
// thematique
.panel-2col-stacked{
.panel-thematique{
background-position: center;
background-size: contain;
@@ -85,21 +105,19 @@ body{
.field-name-field-emvideo img{
width: 100%;
}
.panel-col-top h2{
header.top h2{
font-size: 2.5em;
font-weight: 300;
color: $rouge;
}
.center-wrapper{
.panel-col-first{
width:70%;
}
.panel-col-last{
width:30%;
.field-name-body{
display:none;
}
.right{
}
.left{
.field-name-body{
display:none;
}
}
.panel-col-bottom{
.bottom{
.field-name-field-episodes{
// letter-spacing: -0.25em;
&>.field-items{
@@ -0,0 +1,18 @@
.panel-thematique{
letter-spacing: -0.25em;
}
.panel-thematique>*{
letter-spacing: normal;
}
.panel-thematique .right,.panel-thematique .left{
display: inline-block; vertical-align: top;
}
.panel-thematique .right{
width:75%;
}
.panel-thematique .left{
width: 25%;
}
.panel-thematique .bottom{
}
@@ -0,0 +1,19 @@
<?php
/**
* @file
* Plugin definition.
*/
$plugin = array(
'title' => t('Clameur'),
'category' => t('Clameur'),
'icon' => 'clameur.png',
'theme' => 'panels_clameur',
'css' => 'clameur.css',
'regions' => array(
'top' => t('Top'),
'left' => t('Left side'),
'right' => t('Right side'),
'bottom' => t('Bottom'),
),
);
Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

@@ -0,0 +1,15 @@
<section class="panel-thematique" <?php if (!empty($css_id)) {print "id=\"$css_id\"";} ?>>
<header class="top">
<?php print $content['top']; ?>
</header>
<section class="right">
<?php print $content['left']; ?>
</section>
<section class="left">
<?php print $content['right']; ?>
</section>
<section class="bottom">
<?php print $content['bottom']; ?>
</section>
</section>
@@ -0,0 +1,15 @@
<?php
/**
* @file
* Implementation of hook_panels_layouts().
*/
// Plugin definition.
$plugin = array(
'title' => t('Column'),
'category' => t('Columns: 1'),
'icon' => 'column.png',
'theme' => 'panels_column',
'css' => 'column.css',
'regions' => array('middle' => t('Middle column')),
);
Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

@@ -0,0 +1,15 @@
<?php
/**
* @file
* Template for a 3 column panel layout.
*
* This template provides a very simple "one column" panel display layout.
*
* Variables:
* - $id: An optional CSS id to use for the layout.
* - $content: An array of content, each item in the array is keyed to one
* panel of the layout. This layout supports the following sections:
* $content['middle']: The only panel in the layout.
*/
?>
<?php print $content['middle']; ?>
@@ -0,0 +1,11 @@
<?php
// dsm($vars, 'vars');
$display = $vars['display'];
$node_ctx = $display->context['requiredcontext_entity:node_1'];
// dsm($node_ctx, 'node_ctx');
// change css id with node alias to be able to link it with anchors on top menu
$vars['css_id'] = drupal_get_path_alias('node/'.$node_ctx->data->nid);
// dsm($vars['css_id'], 'css_id');
@@ -0,0 +1,4 @@
<?php
// dsm($vars, 'vasr');
@@ -42,12 +42,6 @@
* @see theme_field()
*/
?>
<!--
THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
See http://api.drupal.org/api/function/theme_field/7 for details.
After copying this file to your theme's folder and customizing it, remove this
HTML comment.
-->
<section class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php if (!$label_hidden): ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:&nbsp;</div>
@@ -0,0 +1,60 @@
<?php
/**
* @file Panels-pane.tpl.php
* Main panel pane template.
*
* Variables available:
* - $pane->type: the content type inside this pane
* - $pane->subtype: The subtype, if applicable. If a view it will be the
* view name; if a node it will be the nid, etc.
* - $title: The title of the content
* - $content: The actual content
* - $links: Any links associated with the content
* - $more: An optional 'more' link (destination only)
* - $admin_links: Administrative links associated with the content
* - $feeds: Any feed icons or associated with the content
* - $display: The complete panels display object containing all kinds of
* data including the contexts and all of the other panes being displayed.
*/
?>
<?php if ($pane_prefix): ?>
<?php print $pane_prefix; ?>
<?php endif; ?>
<div class="<?php print $classes; ?>" <?php print $id; ?> <?php print $attributes; ?>>
<?php if ($admin_links): ?>
<?php print $admin_links; ?>
<?php endif; ?>
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<<?php print $title_heading; ?><?php print $title_attributes; ?>>
<?php print $title; ?>
</<?php print $title_heading; ?>>
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php if ($feeds): ?>
<div class="feed">
<?php print $feeds; ?>
</div>
<?php endif; ?>
<div class="pane-content">
<?php print render($content); ?>
</div>
<?php if ($links): ?>
<div class="links">
<?php print $links; ?>
</div>
<?php endif; ?>
<?php if ($more): ?>
<div class="more-link">
<?php print $more; ?>
</div>
<?php endif; ?>
</div>
<?php if ($pane_suffix): ?>
<?php print $pane_suffix; ?>
<?php endif; ?>