From 47fe02f7875a9df4f9e4c05a6feeffa06ee9d44f Mon Sep 17 00:00:00 2001 From: vagrant Date: Sun, 8 Jul 2018 16:20:52 +0000 Subject: [PATCH] 981:place meetthedev on homepage via form settings --- web/modules/custom/posse_dc/posse_dc.module | 22 ++++++++++++------- .../block--meetthedevblock.html.twig | 5 ++--- .../templates/page--front.html.twig | 15 ++++++++++++- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/web/modules/custom/posse_dc/posse_dc.module b/web/modules/custom/posse_dc/posse_dc.module index 4e92fff3..62319e92 100644 --- a/web/modules/custom/posse_dc/posse_dc.module +++ b/web/modules/custom/posse_dc/posse_dc.module @@ -10,28 +10,34 @@ function posse_dc_preprocess(&$variables, $hook) { $testimonial_block = views_embed_view('testimonial', 'block_1'); $testimonial['testimonial_block'] = $testimonial_block; + $meetthedevblock_block = views_embed_view('meetthedevblock', 'block_1'); + $meetthedevblock['meetthedevblock_block'] = $meetthedevblock_block; + $services_block = \Drupal\block\Entity\Block::load('services'); $services_block_content = \Drupal::entityManager() ->getViewBuilder('block') ->view($services_block); + $variables['services_block'] = $services_block_content; $posse_config = \Drupal::config('posse_dc.possesettings'); $variables['blog_display'] = (bool) $posse_config->get('blog_display'); - + $variables['portfolio_display'] = (bool) $posse_config->get('portfolio_display'); - + $variables['services_display'] = (bool) $posse_config->get('services_display'); + $variables['meetthedevblock_display'] = (bool) $posse_config->get('meetthedevblock_display'); + $variables['testimonial_display'] = (bool) $posse_config->get('testimonial_display'); - $variables['service_1_title'] = $posse_config->get('service_1_title'); + $variables['service_1_title'] = $posse_config->get('service_1_title'); $variables['service_1_body'] = $posse_config->get('service_1_body'); - $variables['service_2_title'] = $posse_config->get('service_2_title'); - $variables['service_2_body'] = $posse_config->get('service_2_body'); - $variables['service_3_title'] = $posse_config->get('service_3_title'); - $variables['service_3_body'] = $posse_config->get('service_3_body'); + $variables['service_2_title'] = $posse_config->get('service_2_title'); + $variables['service_2_body'] = $posse_config->get('service_2_body'); + $variables['service_3_title'] = $posse_config->get('service_3_title'); + $variables['service_3_body'] = $posse_config->get('service_3_body'); $variables['posse_color'] = $posse_config->get('posse_color'); - + } diff --git a/web/themes/custom/posse_theme/templates/block--meetthedevblock.html.twig b/web/themes/custom/posse_theme/templates/block--meetthedevblock.html.twig index 6720e030..1a169331 100644 --- a/web/themes/custom/posse_theme/templates/block--meetthedevblock.html.twig +++ b/web/themes/custom/posse_theme/templates/block--meetthedevblock.html.twig @@ -52,7 +52,7 @@
coffeephoto of Reed Richardsdogcomputercamera
-

Meet the Dev

+

{{ content }}

Reed Richards

@@ -60,8 +60,7 @@ Drupal 7 logo Wordpress logo
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

-
+

{{ meetthedevblock_display }}

{% endif %} + {% if meetthedevblock_display %} +
+
+
+
+

Meet the Dev

+

Reed Richards

+ {{ meetthedevblock_block }} +
+
+
+
+ {% endif %} {% if testimonial_display %}
@@ -154,7 +167,7 @@ {% endblock %} {% endif %}
-
+ {% if blog_display %}