Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to commit Reorganize page hierarchy updates #329

Open
wetfire2k opened this issue Oct 28, 2020 · 3 comments
Open

How to commit Reorganize page hierarchy updates #329

wetfire2k opened this issue Oct 28, 2020 · 3 comments
Labels

Comments

@wetfire2k
Copy link

wetfire2k commented Oct 28, 2020

I have a simple widget that uses informations about page hierarchy to draw a context side menu bar.

{% import 'macros/menuItem.html' as menuItem %}
{% macro render(page, slug) %}
{% if (page.level == 3) %}  
{% set children = page._children %}  
  <div class="menu-ist panel-group" id="accordion" role="tablist" aria-multiselectable="true">
    <div class="panel panel-default menuPageChildren">
      <div class="panel-heading" role="tab" id="headingOne">
        <h4 class="panel-title">
          <a href="{{page._url}}">
            {{page.title}}
          </a>          
        </h4>
      </div>      
        <div class="panel-body">
          {% if children %}
          <ul class="m-0 p-0 main-menu">
              {% for child in children %}
                {{ menuItem.render(child, slug) }}
              {% endfor %}           
          </ul>        
          {% endif %}
      </div>
    </div>
  </div>
{% elseif page.level > 3 %}  
  {{ render(page._ancestors[3], slug) }}
{% endif %}
{% endmacro %}

If I reorganize pages I can get the right tree in draft and preview mode but not in live view.
I done a "select all" and commit all batch in the page but with no success.

@wetfire2k wetfire2k added the bug label Oct 28, 2020
@abea abea self-assigned this Nov 4, 2020
@wetfire2k
Copy link
Author

I think is the same problem of issue #289

@abea
Copy link
Contributor

abea commented Nov 17, 2020

Sorry for the delay. We've not had a lot of extra time lately. I'll try to look this week. If you can provide a minimal test case project that would help speed things up.

@wetfire2k
Copy link
Author

Sorry, I missed the notifications.
You can find in the attachments my page tree, the above code in "draft" mode and live.
You'll see that the side menu in live mode doesn't show the right data.
The only way I had to make links appears is to move every page (1600 pages) in the tree view and commit one per time.
Thanks
tree
draft
live

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants