Skip to content

Can't filter Pages by language #19

@uaqben

Description

@uaqben

I've tried quite a few approaches, but I just can't figure this thing out.

Posts for me work fine.

But I can't figure a way to scope only the current language's Pages that I want displayed in the site's navigation bar.

Any pointers/suggestions?

I take it the following is not implemented, correct?

{% for page in site.pages_by_language.en %}

I've tried using set_lang, but didn't work either, I get an error from Jekyll/Liquid

 {% set_lang en %}
 {% for page in site.pages %}
 {% if page.title %}
     <li class="page-scroll">
         <a href="{{ lang }}{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a>
     </li>
 {% endif %}
 {% endfor %}
 {% endset_lang %}

Liquid Exception: can't clone NilClass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions