2016-11-28 68 views
0

我已经使用Luna主题设置了Bigcartel网站。我的客户一直在卖家具。他现在也想要举办艺术家展览,并在他的网站上出售这些作品。问题是他不希望两个群体混在一起。如何隐藏Bigcartel中特色产品和类别导航中的特定类别

我想制作将从特色产品列表和类别导航中隐藏的类别。然后,我们将从一个名为“展览”的自定义页面手动链接到每个艺术家的类别页面。

似乎应该有一个简单的变量,只会隐藏类别链接,而不是实际的类别页面。

我希望这是有道理的。非常感谢。我也打开了解决这个问题的不同方式,但这似乎是要走的路。

这里是主页...与它的特色产品和类别导航也:http://www.otherspacela.com/products

迪伦

回答

0

要隐藏你的导航特定类别,你会想要写一个if声明...

{% if category.permalink != 'seating' and category.permalink != 'lighting' %} 

{% endif %} 

这将隐藏座位和照明类别。为了实现这一点,找到下面的代码(靠近你的家具页面的顶部)

<ul> 
    <li class="{% if page.full_url contains '/products' %}selected{% endif %}"><a href="/products">All</a></li>  
    {% for category in categories.active %} 
    <li class="page {% if page.full_url contains category.url %}selected{% endif %}">{{ category | link_to }}</li> 
    {% endfor %} 
</ul> 

修改代码的第4行像这样,你将所有设置:

<ul> 
    <li class="{% if page.full_url contains '/products' %}selected{% endif %}"><a href="/products">All</a></li>  
    {% for category in categories.active %} 
    {% if category.permalink != 'seating' and category.permalink != 'lighting' %} 
     <li class="page {% if page.full_url contains category.url %}selected{% endif %}">{{ category | link_to }}</li> 
    {% endif %} 
    {% endfor %} 
</ul> 
+0

感谢尼克!完美地工作。 – Dylan

相关问题