kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 131 forks source link

Project categories not sorting #89

Open jarekdudzinski opened 11 years ago

jarekdudzinski commented 11 years ago

Hey, First: thanks for hard work on Stacey - it's really great :) The problem: In previous versions (v2), when you clicked on some category listed on left, only entries from that category were displayed. Now, it also displays entries from other categories (I have just copied '1.projects' folder and renamed it to '5.other'. Also changed category name in 'category.yml'). How to fix that? J.

ghost commented 10 years ago

Hey, I'm afraid I have the exact same problem, and tweaking the category-lists.html file accordingly doesn't seem to work. Have you found any solution? I'm considering reverting to 2.3.0 for the time being.

ghost commented 10 years ago

Okay, just for the sake of it, here's how to do it:

replace the content of /templates/partials/navigation/category-lists.html with the following:

{% if page.children %}
    <ul class="projects">
    {% for child in page.children %}
      <li class="col seven {{ child.id }}">
        <p class="date col one">{{ child.date | date("Y, M-") }}</p>
        <h2 class="col five">
          {% if child.thumb %}
            <img src="{{ child.thumb.url }}" width="{{ child.thumb.width }}" height="{{ child.thumb.height }}" class="project-thumb" alt="">
          {% endif %}
          <a href="{{ child.url }}">{{ child.title }}</a>
        </h2>
      </li>
    {% endfor %}
    </ul>
{% endif %}