Permalink
Browse files

add field group for main content

  • Loading branch information...
1 parent b965d4e commit 30341aee6c90c1fa991b70e4a0521f095574114f @zroger committed Jan 22, 2012
Showing with 61 additions and 6 deletions.
  1. +45 −0 vantage_page.field_group.inc
  2. +1 −0 vantage_page.info
  3. +15 −6 vantage_page.module
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Bulk export of field_group objects generated by Bulk export module.
+ */
+
+/**
+ * Implementation of hook_field_group_info()
+ */
+function vantage_page_field_group_info() {
+ $field_groups = array();
+
+ $field_group = new stdClass;
+ $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
+ $field_group->api_version = 1;
+ $field_group->identifier = 'group_main|node|page|form';
+ $field_group->group_name = 'group_main';
+ $field_group->entity_type = 'node';
+ $field_group->bundle = 'page';
+ $field_group->mode = 'form';
+ $field_group->parent_name = '';
+ $field_group->data = array(
+ 'label' => 'Main Content',
+ 'weight' => '0',
+ 'children' => array(
+ 0 => 'page_content',
+ 1 => 'page_content_formatter',
+ 2 => 'title',
+ ),
+ 'format_type' => 'tab',
+ 'format_settings' => array(
+ 'label' => 'Main Content',
+ 'instance_settings' => array(
+ 'required_fields' => 1,
+ 'classes' => '',
+ 'description' => '',
+ ),
+ 'formatter' => 'closed',
+ ),
+ );
+ $field_groups['group_main|node|page|form'] = $field_group;
+
+ return $field_groups;
+}
View
@@ -6,3 +6,4 @@ package = Vantage
dependencies[] = template_field
dependencies[] = template_mustache
dependencies[] = formatter_field
+dependencies[] = field_group
View
@@ -21,10 +21,19 @@ function vantage_page_node_info() {
}
/**
- * Implements hook_template_api_templates().
+ * Implement hook_ctools_plugin_api().
*/
-function vantage_page_template_api_templates() {
- $templates = array();
+function vantage_page_ctools_plugin_api($module, $api) {
+ if ($module == 'field_group' && $api == 'field_group') {
+ return array('version' => 1);
+ }
+}
+
+/**
+ * Implementation of hook_default_template()
+ */
+function vantage_page_default_template() {
+ $template_types = array();
$template_type = new Template;
$template_type->disabled = FALSE; /* Edit this to true to make a default template_type disabled initially */
@@ -49,7 +58,7 @@ function vantage_page_template_api_templates() {
'css' => '',
'libraries' => array(),
);
- $templates[$template_type->name] = $template_type;
+ $template_types['vantage_one_column'] = $template_type;
- return $templates;
-}
+ return $template_types;
+}

0 comments on commit 30341ae

Please sign in to comment.