2012-08-17 16 views
8

में श्रेणियों का उपयोग करके फ़िल्टरिंग पोस्टिंग मैं जेकिल और जेकिल-बूटस्ट्रैप का उपयोग कर नया हूं।जेकिल-बूटस्ट्रैप

मैं श्रेणी के द्वारा फ़िल्टर करने के लिए इस पाया है:

<ul class="posts"> 
{% for post in site.posts %} 
    {% if post.categories contains 'demography' %} 
     <li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li> 
    {% endif %} 
{% endfor %} 
</ul> 

यह काम नहीं करता जब मैं टैग और श्रेणियों गठबंधन करने के लिए प्रयास करें:

<ul class="posts"> 
{% for post in site.posts %} 
    {% if post.categories contains 'demography' and post.tags contains 'R' %} %} 
     <li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li> 
    {% endif %} 
{% endfor %} 
</ul> 

किसी भी विचार?

अग्रिम धन्यवाद!

+0

सरलीकृत रूप से, यदि आप एक-दूसरे में निहित बयान देते हैं तो आप केवल 2 का उपयोग कर सकते हैं। – huon

उत्तर

4

आपके पास %} लाइन # 3 में बहुत अधिक है।

इसके अलावा, इसे ठीक काम करना चाहिए।