Stats: 3,189,725 members, 7,938,241 topics. Date: Monday, 02 September 2024 at 08:36 PM |
Nairaland Forum / Science/Technology / Programming / How Can I Implement Previous And Next Page In Handlebars (527 Views)
How Can I Host Express Template Engine (handlebars) / How Do I Implement This In Python ?? / How Do I Implement A Contact Page In ASP.NET/C#? (2) (3) (4)
(1) (Reply)
How Can I Implement Previous And Next Page In Handlebars by ricson11(m): 2:18am On May 20, 2020 |
Using the following details in index.pug: (pug template) how can I implement this to handlebars node js view engine. Others are working fine but I don't know how to implement the previous and next page. extends layout block content body br br br .container ul.list-group each post, i in posts li.list-group-item a(href="/posts/" + posts._id)= posts.title ul if current > 1 li a(href=`?page=${parseInt(current) - 1}`) Previous - var i = 1 while i <= pages li a(href=`?page=${i}`)= i++ if current < pages li a(href=`?page=${parseInt(current) + 1}`) Next |
(1) (Reply)
How To Shop Zara, Fashionnova, Asos & Lasenza And Others From Nigeria / Rant On Operating System Stuff. / How To Create A Simple Page Loader Using Html And Css
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |