Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Theme Skeleton Agency

theme

Started by Steppo 5 years ago · 8 replies · 649 views
5 years ago

Hello everybody,

I installed the Skeleton Package Agency and played around with it a bit.
I can't sort the sections. Neither manually nor via the admin area. The order always remains the same. I tried manual sorting in the admin area via "Numerical folder prefix" as well as via the file "user / pages / 01.home / modular.md" the order of the modular elements does not change.

Cache was also emptied and disabled several times.

What am I doing wrong or where exactly do I have to look? So far I could go to such changes via "Numeric Folder Prefix".

Thank you in advance for your help.

5 years ago

I guess you have same issue I had. Sadly, I have no idea how to fix this, because it just sorted out at some point and I didn't have to do anything.

5 years ago

Would be great if it would fix itself :-)

What have you done? Have all prefabricated _module elements deleted and recreated?

5 years ago

TBH, I don't really remember. I encountered this behaviour while getting to know Grav and then, when was finalising the content for my page, it just sorted out. My best guess - some combination of ordering modules and saving content fixed it 🤷‍♂️

5 years ago

@steppo, Theme Agency seems to be working correctly, but maybe not as expected...

  • Downloaded skeleton Agency
  • Unzipped
  • Browsed to 'localhost/agency'
  • Forced to created admin account
  • Browsed to 'localhost/agency' again

Modules:

  • Order of modules shown reflect the order set in modular.md
    YAML
    - _header
    - _services
    - _portfolio
    - _about
    - _team
    - _clients
    
  • Altered ordering in modular.md to:
    YAML
    - _header
    - _team
    - _services
    - _portfolio
    - _about
    - _clients
    
  • Refreshed 'localhost/agency': Order is as in modular.md

Menu:
However, the menu is a different story.
Looking at /user/themes/agency/templates/partials/navigation.html.twig, it shows:

TWIG
{% for link in site.links %}
  ...
{% endfor %}

This means the menu is created based on the links in /user/config/site.yaml:

YAML
links:
  - title: Portfolio
    url: '#portfolio'
  - title: About
    url: '#about'
  - title: Team
    url: '#team'
  - title: Services
    url: '#services'
  - title: Contact
    url: '#contact'
  • Changed order in site.yaml
  • Refreshed page: menu reflects order correctly.
    • Although order of menu doesn't reflect order of modules anymore...
    • Yes, that's how it was done in 2015 when the theme was designed...
last edited 04/21/21 by pamtbaau
5 years ago

Thank you for your answer. I'll look at that again later.

5 years ago

Hello @pamtbaau,

thank you again for your feedback.

So, I downloaded everything again and set it up on the web server, including admin.

Directly without updating the modular.md content moved works.
After the update, moving content via the modular.md also worked.

What doesn't work is if I want to change the order of the modular pages using Folder Numeric Prefix. This is not taken over in the modular.md.

The folders all get a number in front of it and this also changes. Only the modular.md file does not adapt. I was able to find out now.

What irritates me is that I tried to change the order using modular.md and that didn't change anything.

5 years ago

@steppo,

What doesn’t work is if I want to change the order of the modular pages using Folder Numeric Prefix. This is not taken over in the modular.md.

Admin, can only do so much... It's a thin wrapper around everything Grav has to offer when using an IDE, and/or terminal. And it adds complexity...

Remove the custom section in modular.md. It will then order by default, which is the order of the module folders on disk. See the docs: page collections/ordering

What irritates me is...

I'm afraid you're gonna have a lot of irritation in life if you remain building apps.. 😇

last edited 04/22/21 by pamtbaau
5 years ago

Just to put my two cents in as I am going through my first theme to get a proper understanding of how grav works.

@steppo When you change the order of modular.md, the order of the sections will change as if you click the site menu items, you will notice it will now jump (smoothly) to the anchor points of each module , rather than a smooth scroll , passing through each item in the set / controlled order of the site menu.

Its more of astheics thing but pamtbaau pointed out the site.links in the code which I had not encountered before.

So to change the order, you need to change the site.yaml and the modular.md and make them match to achieve what I think you are trying to do.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 197 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 454 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 47 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 127 3 months ago