Giter Club home page Giter Club logo

Comments (6)

ParitoshBh avatar ParitoshBh commented on September 2, 2024

Pagination logic is already there in the theme itself. You shouldn't have needed to make the changes you made.

Can you please confirm if,

  1. you've followed the instructions as mentioned under Blog (Listing) Setup?
  2. you've updated grav-coder.yaml to include following config,
post:
  navigation: true

from grav-coder.

guime7000 avatar guime7000 commented on September 2, 2024

Hi !

My directory and file structure is :

mygrav/
└── grav-admin/
    └── user/
        └── pages/
            ├── 01.blog/
            │   ├── 02.dir1/
            │   │   └── item.md
            │   ├── 03.dir2/
            │   │   └── item.md
            │   ├── 04.dir3/
            │   │   └── item.md
            │   └── blog.md
            └── 02.Typography

Inside 01.blog directory, my blog.md contains :

---
 content:
     items: '@self.children'
     order:
         by: date
         dir: desc
     limit: 10
     pagination: true
 metadata:
   description: 'Some description for metadata'
 ---

and my grav-coder.yaml file inside mygrav//grav-admin/user/themes/grav-coder/ contains :

enabled: true
dropdown:
  enabled: true
navbar:
  title: MyTitle
#  url: https:/myurl/blog
#  rel: me
  auth_link:
    enabled: false
    login_slug: login
    login_label: Login
#footer:
#  copyright: Grav Coder

social:
  github:
    title: Github
    url: https://mygithubURL
    icon: fab fa-github
    rel: me
  linkedin:
    title: LinkedIn
    url: https:/myLinkedInURL
    icon: fab fa-linkedin-in
    rel: me
post:
  navigation: true
  taxonomy: true
#listing_title:
#  taxonomy:
#    category: 'Category: '
#    tag: 'Tag: '
#  blogs: 'Posts'
pages:
  order:
    by: default
    dir: asc

pagination:
  count: 10

So where could be my mistake(s) ?

from grav-coder.

ParitoshBh avatar ParitoshBh commented on September 2, 2024

I tested your setup with grav version 1.7.35 and 1.7.38 and the navigation links work just fine. And your configs seem to be fine as well. The directory structure however, seems interesting. Since I cannot reproduce it on my end, would you be able to share a bare minimum zip of your setup?

from grav-coder.

guime7000 avatar guime7000 commented on September 2, 2024

For sure ! Tell me what you need in the zip file, and I'll attach it !

from grav-coder.

ParitoshBh avatar ParitoshBh commented on September 2, 2024

Based on your file structure, I would say a zip of mygrav directory. Please redact any private information and if you aren't comfortable sharing zip here (or it is too big), feel free to send it to my email paritoshbh [at] outlook [dot] com

from grav-coder.

oldstonegryzzly avatar oldstonegryzzly commented on September 2, 2024

I have the same problem, partially resolved with page.parent().children().prevSibling(page.path).url but {% if not page.isLast %} and {% if not page.isFirst %} dont work properly : next and prev they also remain on the first and last page.

edit:

next and prev work fine with: {% if not page.parent().children().isFirst(page.path) %}

Grav 1.7.46 - Admin v1.10.46

thanks for your works and sorry for my bad english...

from grav-coder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.