Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,158,943 members, 7,838,364 topics. Date: Thursday, 23 May 2024 at 08:23 PM |
Nairaland Forum / Science/Technology / Programming / How Can I Implement Previous And Next Page In Handlebars (509 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)
Learn To Program By Creating Working Applications - FREE / Nvm / Just Launched!!! BAKIFY Mobile App That Allows You To Request The Nearest Truck
(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. 5 |