فهرست منبع

added excerpt to the posts

Juan Carlos 4 سال پیش
والد
کامیت
c899d04290
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      marktplatz/templates/marktplatz/product_detail.html

+ 5 - 3
marktplatz/templates/marktplatz/product_detail.html

@@ -294,6 +294,7 @@
 						v-bind:key="post.id"
 						v-bind:title="post.title"
 						v-bind:link="post.link"
+						v-bind:excerpt="post.excerpt"
 					></blog-post>
 					</ul>
 
@@ -442,14 +443,15 @@
 
 		}
 
-		function generateLinks(resp) {
+		function generateLinks(data) {
 
 			Vue.component('blog-post', {
-				props: ['title', 'link'],
+				props: ['title', 'link', 'excerpt'],
 				delimiters: ['<%', '%>'],
 				template: `
 		 <li>
 			 <a title="link-title" :href="link" target="_blank" v-html="title.rendered"></a>
+			 <p v-html="excerpt.rendered"></p>
 		 </li>`
 			})
 
@@ -458,7 +460,7 @@
 				el: '#blog-posts-container',
 				delimiters: ['<%', '%>'],
 				data: {
-					posts: resp
+					posts: data
 				}
 			})