Khi nâng cấp lên widget Blog1 version 2 từ version 1 bạn sẽ thấy khi tải trang mặc định sẽ xuất hiện đoạn html <div class=”blog-posts hfeed container”>…</div> vì những class này được nằm cố định trong thẻ tag gọi dữ liệu mặc định <b:include name=’super.main’/> trong thẻ tag <b:includable id=’main’> của widget Blog1.
Nếu bạn muốn loại bỏ những class này hoặc đơn giản muốn thay bằng class khác bạn có thể làm theo cách sau:
Trong thẻ tag <b:includable id=’main’> của widget Blog1 bạn xóa thẻ tag <b:include name=’super.main’/> đi và thay bằng các thẻ tag dưới đây:
+ Không sử dụng class:
Copy
<b:loop values='data:posts' var='post'>
<b:include data='post' name='postCommentsAndAd'/>
</b:loop>
<b:include cond='data:view.isMultipleItems' name='postPagination'/>
<b:include name='feedLinks'/>
+ Sử dụng class ví dụ post-outer
Copy
<b:loop values='data:posts' var='post'>
<div class='post-outer'>
<b:include data='post' name='postCommentsAndAd'/>
</div>
</b:loop>
<b:include cond='data:view.isMultipleItems' name='postPagination'/>
<b:include name='feedLinks'/>
Hình minh họa với ví dụ không sử dụng class

Chấm hết bài!!!
View Comments
Published by
VuTienBlog
5 years ago