Procházet zdrojové kódy

template twig tmpsfort

chloe před 4 roky
rodič
revize
27abaedb4d

+ 17 - 0
web/app/themes/la_mine/les_temps_forts.php

@@ -8,3 +8,20 @@ $context = Timber::context();
 $timber_post     = new Timber\Post();
 $context['post'] = $timber_post;
 Timber::render( array( 'page-' . $timber_post->post_name . '.twig', 'les_temps_forts.twig' ), $context );
+
+//repeater de temps forts
+if(get_field('temps_forts')):
+  <ul>
+    <while (has_sub_field('temps_forts')): {
+      <li>sub_field_1 = the_sub_field('nom_du_temps_fort');
+      sub_field_2 = the_sub_field('sous_titre');
+      sub_field_3= the_sub_field('paragraphe_descriptif');
+      sub_field_4= the_sub_field('choose');
+      </li>
+    }
+    endwhile;
+  </ul>
+endif;
+
+
+?>

+ 0 - 6
web/app/themes/la_mine/templates/components/title_page.twig

@@ -1,9 +1,3 @@
-{% if name == 'true' %}
-  {% set class = "title_bene" %}
-{% else %}
-  {% set class = "title" %}
-{% endif %}
-
 <div class="{{class}}">
 	<h2>{{post.title}}</h2>
 </div>

+ 1 - 1
web/app/themes/la_mine/templates/la_benevole_zone.twig

@@ -2,7 +2,7 @@
 
 {% block content %}
 
-{% include 'components/title_page.twig' with {name: 'true'}    %}
+{% include 'components/title_page.twig' %}
 
 	<div class="colonne_gauche">
 			<section class="article-content">

+ 1 - 1
web/app/themes/la_mine/templates/la_collecte.twig

@@ -1,8 +1,8 @@
 {% extends "base.twig" %}
 
 {% block content %}
+{% include 'components/title_page.twig'  %}
 	<div class="content-wrapper">
-	{% include 'components/title_page.twig'  %}
 		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
 			<section class="article-content">
 				<h1 class="article-h1">{{post.title}}</h1>

+ 14 - 11
web/app/themes/la_mine/templates/les_temps_forts.twig

@@ -1,14 +1,17 @@
 {% extends "base.twig" %}
-
 {% block content %}
-	<div class="content-wrapper">
-		<article class="post-type-{{post.post_type}}" id="post-{{post.ID}}">
-			<section class="article-content">
-				<h1 class="article-h1">{{post.title}}</h1>
-				<div class="article-body">
-					{{post.content}}
-				</div>
-			</section>
-		</article>
-	</div><!-- /content-wrapper -->
+
+{% include 'components/title_page.twig'%}
+
+<!--
+<div class="colonne_gauche">
+		<section class="article-content">
+			<h1 class="nom_du_temps_fort"></h1>
+			<h2 class="sous-titre"></h2>
+			<div class="article-body">
+			</div>
+		</section>
+</div>
+<div class = "slide_medias">
+</div> -->
 {% endblock %}